Filter löschen
Filter löschen

Plot 2D vector in AppDesigner

4 Ansichten (letzte 30 Tage)
Alberto
Alberto am 8 Feb. 2024
Kommentiert: Austin M. Weber am 10 Feb. 2024
Hello there!
I'd like to use the command vplot in MATLAB AppDesigner, but it doesn't work.
Is it possible to use it? or is there any other option to plot a vector in 2D in AppDesigner?

Antworten (1)

Austin M. Weber
Austin M. Weber am 8 Feb. 2024
I could not get the vplot function to work, but there is always quiver.
For instance, if you add a button to your app and give it a callback function you can give it the following commands:
load wind
quiver(app.UIAxes,x(:,:,7),y(:,:,7),u(:,:,7),v(:,:,7));
ylim(app.UIAxes,[30 50])
xlim(app.UIAxes,[85 115])
This will produce a nice 2D vector plot in the app designer (assuming that you already have a UIAxes pane with the name UIAxes in the app):
  4 Kommentare
Alberto
Alberto am 8 Feb. 2024
Thanks a lot, sir! Really useful
Austin M. Weber
Austin M. Weber am 10 Feb. 2024
@Alberto Happy to help! If the solution is working for you then you should click the green button to accept the answer.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Environment and Settings finden Sie in Help Center und File Exchange

Produkte


Version

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by