Why does my plot not display when I use a nested loop?
조회 수: 1(최근 30일)
표시 이전 댓글
I am trying to use the following code to iteratively plot various lines on a single graph:
plot (a, c)
Why is my figure blank when I run it?
댓글 수: 0
Michael Haderlein 2015년 5월 28일
편집: Michael Haderlein 2015년 5월 28일
If you want to get this as line plot, you'll need all values of a and c to be in one array each. If the example you have posted is the real equation, you should simply vectorize it and things become much easier:
If this was just sketching the problem and you cannot vectorize your function, you'll need to save all c values:
댓글 수: 1
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!