Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


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

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  
Curious

Posts: 1,978
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$1@newscl01ah.mathworks.com>...
> 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

then

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]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.