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?

 Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 7 Jul. 2016
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 Kommentare

Yash
Yash am 7 Jul. 2016
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 am 7 Jul. 2016
I have attached the image of the structure and the variables inside the structure

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Gefragt:

am 7 Jul. 2016

Kommentiert:

am 7 Jul. 2016

Community Treasure Hunt

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

Start Hunting!

Translated by