GUI IN MATLAB 2021B, HOW TO SELSCT LISTBOX

조회 수: 4 (최근 30일)
yasmeen hadadd
yasmeen hadadd 2024년 7월 23일
댓글: Walter Roberson 2024년 7월 23일
HI
how i change the color map of figure in GUI by ListBox Items:{ jet hot cool .....} using GUI
  댓글 수: 3
Walter Roberson
Walter Roberson 2024년 7월 23일
selected_colormap = Items{app.ColormapListBox.Value};
That should be
selected_colormap = Items{app.ColormapListBox.ValueIndex};
Walter Roberson
Walter Roberson 2024년 7월 23일
Better would be
function ColormapListBoxValueChanged(app, event)
selected_colormap = app.ColormapListBox.Value;
colormap(app.UIAxes, selected_colormap)
end

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2024년 7월 23일
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);

카테고리

Help CenterFile Exchange에서 White에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by