Matrix dimensional error is because, value and options are compared using ‘==’ operator, it gives error when the length of the value differs from option length. Use strcmp instead of ‘==’ operator, which compare strings of different length.
The line
value = app.drop.Value;
in your code also gives error as there is no method or property named drop, use DropDown instead.
You can use following code to display image after your select first option “Inverting” from DropDown menu.
function DropDownValueChanged(app, event)
value = app.DropDown.Value;
global a
if strcmp(value,'Inverting')
[filename, pathname] =uigetfile({'*.jpg'},'File Selector');
fullpathname=strcat(pathname,filename);
a=imread(fullpathname);
imshow(a,'parent',app.UIAxes);
end
end
For more information about strcmp follow the link https://www.mathworks.com/help/matlab/ref/strcmp.html
Hope this helps!