Borrar filtros
Borrar filtros

How to plot vector in app designing

4 visualizaciones (últimos 30 días)
Abrar
Abrar el 25 de Feb. de 2023
Movida: dpb el 25 de Feb. de 2023
I want to plot vectors in Appdesign but it is showing 2D plot instead of 3D plot. Please help me

Respuestas (1)

dpb
dpb el 25 de Feb. de 2023
Movida: dpb el 25 de Feb. de 2023
How would you propose to plot in 3D just vector data? And, of course, plot is only a 2D x-y plotting routine; it knows nothing else so if you call it, that's definitely what you're going to get.
The call
plot(app.UIAxes,v1)
doesn't even have an x-coordinate supplied to it; it treats the values in v1 as the y values and plots them against the ordinal postiion (1:numel(v1)).
What are you trying to achieve here? Draw us a sketch of what you think the result should be from a given set of data.
Well, let's take a guess...we don't have the gui, but we can duplicate the data you show ---
v1=1:3;v2=2:4;v3=v1+v2; % reproduce the vectors shown
hL=plot3(v1,v2,v3,'x-'); % draw a 3D line from them, show the points
xlabel('x'),ylabel('y'),zlabel('z')
grid on % help visualization with grid
xlim([0 4]),ylim([1 5]),zlim([2 8]) % and set range to be outside the data values so not on axes
That more what you had in mind?
See <plot3> for all the details and options in using it...

Categorías

Más información sobre Graphics Object Properties en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by