Selecting Images from the drop-down menu

5 次查看(过去 30 天)
Hi, I have this drop-down menu, and I would like to link the following list with images that I have saved.
Once the image is selected, I would like it to be displayed on the image holders.
Any help would be appreciated.

采纳的回答

yanqi liu
yanqi liu 2021-12-23
% Value changed function: DropDown
function DropDownValueChanged(app, event)
value = lower(app.DropDown.Value);
if strfind(value, 'bird')
app.Original_image.ImageSource = imread('bird.jpeg');
end
if strfind(value, 'phone')
app.Original_image.ImageSource = imread('Phone.jpeg');
end
if strfind(value, 'camera')
app.Original_image.ImageSource = imread('Camera.jpeg');
end
end

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB Support Package for IP Cameras 的更多信息

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by