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: Storing of values in an array
Replies: 7   Last Post: Jan 30, 2014 8:44 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
dpb

Posts: 8,215
Registered: 6/7/07
Re: Storing of values in an array
Posted: Jan 24, 2014 9:25 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 1/24/2014 1:13 AM, Narayanan wrote:
> I have a 2 loops running. The first loop is executed 10 times and 10
> values are stored in an array SF1. The second loop is executed 8 times
> and 8 values are stored in an array SF2. Now finally after coming out of
> both the loops I want to store all the values present in arrays SF1 and
> SF2 in another array OV. But it is storing only the value of the last
> values of SF1 and SF2. Kindly help me in this regard.


W/O seeing the code or knowing the purpose for two arrays my first
question would be why not simply place the results in one array to begin
with?

But, to answer the question

OV=[SF1 SF2]; % SFx are row vectors

or

OV[SF1;SF2]; % they're column-oriented

--




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.