Info
此问题已关闭。 请重新打开它进行编辑或回答。
Why I get different outcomes from iteration as part of a big function and iteration as main part of a small function
1 次查看(过去 30 天)
显示 更早的评论
Hi,
I'm really bothered by this issue and will appreciate help very much.
I have a while loop which has only 7 lines and involve nothing more than plus, minus, exp, logncdf and normcdf. I use a step of 0.000001 to adjust my input variable until it gives output closer to the truth I believe in. This is currently part of a sub-function in a big function However, it will never finish the loop. While if I take the sub-function out, give its input vairables the values which should be when the big funtion runs til this step, this separate function will solve quickly. Since I do need this to be part of the big function, I am kind of iritated by this. Do you have any explanation? does it have something to do with the capacity of Matlab or... ? Everything is the same, the input values were set to be the same and it runs well as a separate function, but not so when this separate function is sub-function of a big function which carries many variable... :(
Thanks in advance!
回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!