Extracting data from a loop
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
mohammed
2011 年 6 月 2 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!