Extracting data from a loop
1 view (last 30 days)
Show older comments
I run a 'FOR' loop with increment of 'mu'...within this I run another 'while' loop to get value of 'lamda' using this 'mu' value which continues to run until the system establish equilibrium...at a certain value of 'mu'...the system is not able to establish equilibrium...I have two problems...I want to know the last incremental value of 'mu' at which equilibrium is possible and the corresponding 'lamda' value??...Secondly I dont know what is the max. value of mu at which I can get equilibrium and sometimes it comes in between two incremental values of 'mu'...but as I am running a 'FOR' loop so it will not give me that value...IS there any way to find it??..Thanks in advance
0 Comments
Answers (1)
mohammed
on 2 Jun 2011
u can get the last value of mu by typing mu in new line without ";"
example
mu
to get max mu u have to store all value of mu in vector, then use max function
example
mymu=[100];% any number out of range
for epoch=1:400 mu = mu * x;%your formula
mu % to print mu value
mymu = [mymu;mu];
end
max(mymu)
0 Comments
See Also
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!