The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Replacing a Column
Replies: 1   Last Post: Feb 12, 2013 1:57 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View  

Posts: 2,359
Registered: 12/6/04
Replacing a Column
Posted: Feb 12, 2013 1:57 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Jessica Parry" wrote in message <kfe2du$q62$>...
> I have a randomly generate array of dimension(121x101).
> The ith column is given by (Vtxe) and has dimension (1x101)
> i is a randomly generated value (between 1 and 101 inclusive obvs).
> How can I replace the orignal ith column with the (Vtxe) column? or produce an array with the ith column as Vtxe. Im out of ideas completely!

I don't have MATLAB installed on this computer, but if:

size(A) = (121x101)
size(b) = (1x101)

and 1<= i <=121


A(i,:) = b

should work.

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.