Post Reply 
1x1 matrix addrow problem
05-31-2016, 11:02 AM (This post was last modified: 05-31-2016 11:04 AM by DrD.)
Post: #2
RE: 1x1 matrix addrow problem
(05-31-2016 09:44 AM)std Wrote:  Example:

But if I have a 1x1 matrix A=(a1) and I want to add a new element "anew" either before a1 or after a1, so it becomes A=transpose([anew a1]) or A=transpose([a1 anew]) respectively, the ADDROW doesn't work.

I could use "append", but it brings the new element to the end of the vector and the size of the vetror becomes 1x2 (row) not 2x1.

I'm not real sure of your objective, but does this help?

a1:=1;
M0:=[a1]; // Original one element matrix
transpose(prepend(M0,0)); // ==> transpose([0 a1])
transpose(append(M0,0)); //==> transpose([a1 0])

-Dale-

-Dale-
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
1x1 matrix addrow problem - std - 05-31-2016, 09:44 AM
RE: 1x1 matrix addrow problem - DrD - 05-31-2016 11:02 AM
RE: 1x1 matrix addrow problem - std - 05-31-2016, 11:52 AM
RE: 1x1 matrix addrow problem - DrD - 05-31-2016, 03:12 PM
RE: 1x1 matrix addrow problem - std - 06-01-2016, 05:04 PM



User(s) browsing this thread: 1 Guest(s)