Genarating 3d Plot from a struct exported matfile

Hello,
I generated a struct file from a project with three variables and exported it into a matfile. Now i need to generate a 3D plot for the three variables from the exported struct containing matfile. Can some one help with this?

 採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2016 年 7 月 7 日

0 投票

If file.mat is your mat-file
data=load('file.mat')
n=fieldnames(data)
x=data.(n{1})
y=data.(n{2})
z=data.(n{3})
plot3(x,y,z)

3 件のコメント

Yash
Yash 2016 年 7 月 7 日
Getting an error Index exceeds matrix dimensions. table1: [16x21 struct] --> struct size y=data.(n{2}), y=data.(n{3})--> These lines getting error
Azzi Abdelmalek
Azzi Abdelmalek 2016 年 7 月 7 日
Can you provide more details about your three variables?
Yash
Yash 2016 年 7 月 7 日
I have attached the image of the structure and the variables inside the structure

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeWorkspace Variables and MAT Files についてさらに検索

質問済み:

2016 年 7 月 7 日

コメント済み:

2016 年 7 月 7 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by