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: How to: index data from a for loop
Replies: 2   Last Post: Apr 4, 2014 10:00 AM

Advanced Search

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

Posts: 6,253
Registered: 2/7/05
Re: How to: index data from a for loop
Posted: Apr 3, 2014 10:47 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 4/3/2014 8:50 PM, Max wrote:
> Hi, I'm trying to figure out how to store a set of data from within a 'for' loop.

N = 10;
A = zeros(N,2); %make space for storage

for i=1:10
mu = rand();
pf = rand();
A(i,:) = [mu,pf]; % STORE THEM

title(A(1,:)); % my title ?

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

[Privacy Policy] [Terms of Use]

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