Printing only the final result of the while loop
1 次查看(过去 30 天)
显示 更早的评论
Hi, I have a matlab code that is of the form:
Initial conditions values of x, y
While loop In which the values of x and y are redesignated
Now i want to print the final values of x and y so I tyoed fprintf(...) after the end of my whhile loop
But it prints the initial values instead, what should I do?
Thanks
2 个评论
Doug Hull
2012-1-17
I suspect you are not 'redesignating' the variables like you think you are. Please post code.
回答(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!