plot in for loop?

what is the wrong in this ? the plot isn't appear. what should i do to make the plot appear ?

回答(1 个)

Image Analyst
Image Analyst 2017-12-28

0 个投票

Try putting drawnow inside the loop, or else (like most people would) make Xr and i and array and plot the whole array only once the loop has finished, that is, call plot() outside the loop. Also don't use i as a variable name - it's not recommended since it's the imaginary variable.

类别

帮助中心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!

Translated by