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일
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
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 Exchange에서 Workspace 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