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 ]
Max

Posts: 1
Registered: 4/3/14
How to: index data from a for loop
Posted: Apr 3, 2014 9:50 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi, I'm trying to figure out how to store a set of data from within a 'for' loop. For example I am running through multiple means in a distribution to find prob of failure for each. I want to have a matrix or even just a set of points that contain the mean and Pf. I tried things such as...
index(i) = (mu,Pf)
hoping to get a result such as
index(20) = (20,0.001)
index(21) = (21,0.002)
but that doesnt work of course.

Is it possible to use the value from a for loop in a title?

also, i realize im going for point values here, and since there will be many a vector would be much much nicer but I cant even imagine how to set that up.

Thanks!



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.