Azzera filtri
Azzera filtri

GUI IN MATLAB 2021B, HOW TO SELSCT LISTBOX

17 visualizzazioni (ultimi 30 giorni)
yasmeen hadadd
yasmeen hadadd il 23 Lug 2024 alle 17:27
Commentato: Walter Roberson il 23 Lug 2024 alle 22:57
HI
how i change the color map of figure in GUI by ListBox Items:{ jet hot cool .....} using GUI
  3 Commenti
Walter Roberson
Walter Roberson il 23 Lug 2024 alle 22:56
selected_colormap = Items{app.ColormapListBox.Value};
That should be
selected_colormap = Items{app.ColormapListBox.ValueIndex};
Walter Roberson
Walter Roberson il 23 Lug 2024 alle 22:57
Better would be
function ColormapListBoxValueChanged(app, event)
selected_colormap = app.ColormapListBox.Value;
colormap(app.UIAxes, selected_colormap)
end

Accedi per commentare.

Risposte (1)

Walter Roberson
Walter Roberson il 23 Lug 2024 alle 17:54
Create a listbox with the colormap names. Set the callback for the listbox to execute
Colormap_name = app.LISTBOXNAME.Value;
colormap(app.FIGURENAME, Colormap_name);

Categorie

Scopri di più su Migrate GUIDE Apps in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by