How to plot the complete data in a structure

10 ビュー (過去 30 日間)
Chao Zhang
Chao Zhang 2021 年 11 月 17 日
回答済み: Prateek Rai 2021 年 11 月 21 日
Hi all,
The following picture is the screenshot of a structure. I want to plot all X Y X coord of this structure, but my code can only plot the X Y Z coord in the 9th row of the structure
And my code is presented here:
for m = 1 : 9
Is there a solution to plot all the xyz coordinates of these 9 rows in one figure?
Many thanks in advance for help!
  1 件のコメント
Adam Danz
Adam Danz 2021 年 11 月 17 日
It would be easier to understand the struct if you attach it in a mat file or supply code that recreates a similar structure.



Prateek Rai
Prateek Rai 2021 年 11 月 21 日
You can try "hold on" to retain current plot when adding new plot.
The code will look like:
for m = 1 : 9
hold on;
You can refer to hold MathWorks documentation page to find more on retaining current plot when adding new plot.

その他の回答 (0 件)


Find more on Structures 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!

Translated by