| New Reply |
How to plot multiple iterations of a while loop on one plot? [MATLAB] |
Share Thread |
| Oct6-11, 09:22 PM | #1 |
|
|
How to plot multiple iterations of a while loop on one plot? [MATLAB]
If I want to plot multiple iterations of a while loop on one plot, how can I do that? Every time I use "hold on", it just distorts the original line after every iteration instead of drawing independent lines.
Please help |
| Oct8-11, 04:08 AM | #2 |
|
|
I'd just build up a vector or array of values.
For instance, if you're plotting the convergence (the difference between the iterative result and the 'real' result), I'd just concatenate the value onto the vector of error values: >> delta=[delta, loop_delta]; If, instead, you're generating an entire vector of values, I'd just build up an array, and then plot them all at the end. Good luck! |
| New Reply |
Similar discussions for: How to plot multiple iterations of a while loop on one plot? [MATLAB]
|
||||
| Thread | Forum | Replies | ||
| Plot 3D matrix as 2D plot and 3rd dimension as color in Mathematica | Math & Science Software | 8 | ||
| Matlab Plot | Math & Science Software | 2 | ||
| Rasterized density plot + countour plot in Mathematica (to solve EPS issues) | Math & Science Software | 0 | ||
| Frequency Plot(or bode plot) in SIMULINK | Engineering Systems & Design | 1 | ||
| 3D Matlab plot | Math & Science Software | 4 | ||