.mat file w/ vertices of 3D image inputted into axes in GUI
Mostra commenti meno recenti
I have a GUI with an axes box, and I have a file V.mat which contains the vertices of a 3D image. How do I make this 3D image show up in the axes?
3 Commenti
Walter Roberson
il 27 Mar 2014
What is a "3d image" for this purpose?
Golnar
il 27 Mar 2014
Golnar
il 27 Mar 2014
Risposta accettata
Più risposte (1)
Joseph Cheng
il 28 Mar 2014
From your screenshot you will not be able to do it there. Are you trying to plot this when it opens? Push of a button?
Where ever you are trying to do this you need to do something like this
handles.axes1; %handles. (tag of the axes)
pointsize=20;
scatter3(V(:,1),V(:,2),V(:,3),pointsize);
now depending on where you want to do this you'll need to do it when V is defined.
When/where do you want to plot the scatter? and when/where/how is V.mat loaded?
8 Commenti
Joseph Cheng
il 28 Mar 2014
Also for clearification this is what you want to do can you paste in a screen shot of what V(1:10,:) looks like
Golnar
il 28 Mar 2014
Golnar
il 28 Mar 2014
Golnar
il 28 Mar 2014
Joseph Cheng
il 28 Mar 2014
then for simplicities sake
within the reset__callback after you load(V.mat):
load(V.mat);
handles.V = V; %store V within handles (dunno if this is best practices but i do it.
guidata(hObject, handles); %update handles globally so we can use it in another function.
in the calculate_callback(hObject, eventdata, handles, varargin)
V=handles.V; %don't have to do this but makes it shorter to type.
handles.axes1; %handles. (tag of the axes) : sets the active axes to the one you want to use.
pointsize=20; %set point size to 20
scatter3(V(:,1),V(:,2),V(:,3),pointsize); %scatter plot V data.
Joseph Cheng
il 28 Mar 2014
I do not know what type of plot you want for that type of data. Its definitely not a [x,y,z] unless the first 18 are just the same point. well if you figure out what type of plot/scatter/image/surface. just substitute scatter3 with what you're trying to do.
Golnar
il 28 Mar 2014
Modificato: Walter Roberson
il 28 Mar 2014
Joseph Cheng
il 28 Mar 2014
oh ok, check back when you get more stuff. i just wasn't sure what type of 3d plot with that much data and i see you only had 3 unique points.
Categorie
Scopri di più su Creating, Deleting, and Querying Graphics Objects in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!







