plotting data with a 1*1 struct
22 次查看(过去 30 天)
显示 更早的评论
Hi
How can I plot data with a 1*1 struct like in these pictures attached bellow:
I am really need this help
Thank you in advance.
0 个评论
回答(1 个)
Jakob B. Nielsen
2021-5-31
Just play around a little bit with how you call specific indices out of a structure, it will become easy once you get the hang of it. For example:
plot(data.Electric_Field.Ex.data(:,1),data.Electric_Field.Ex.data(:,2))
This will plot the first column of the data matrix in the Ex structure in the Electric Field structure in the data structure against the 2nd column of the same structure. Give it a try! :)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Structures 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!