.mat file w/ vertices of 3D image inputted into axes in GUI
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Golnar
il 27 Mar 2014
Modificato: Walter Roberson
il 28 Mar 2014
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
Risposta accettata
Walter Roberson
il 27 Mar 2014
pointsize = 20; %adjust as needed
scatter3(V.mat(:,1), V.mat(:,2), V.mat(:,3), pointsize)
However I am confused now about whether it is [x, y, z] coordinates, or if it is "0's and 1's": if it is 0's and 1's then it is not clear what the x y or z values would be.
6 Commenti
Walter Roberson
il 28 Mar 2014
Modificato: Walter Roberson
il 28 Mar 2014
You had posted "V.mat is a 49358 x 3 matrix of 0's and 1's" so yes, I did mean V.mat
Perhaps what you meant was that the file V.mat contains a variable that has that structure. If so then we would need to know the name of the variable in order to code appropriately. You can use
whos -file V.mat
in order to see the list of variables in the file.
With regards to loading the data in one place and plotting it in another:
I still don't understand how your (x,y,z) and color are to relate together to be plotted.
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
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.
Vedere anche
Categorie
Scopri di più su Data Exploration in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!