Hello, as a beginner with App Designer I would like to ask about problem with access to files and variables in App Designer. In my app I have, button for loading serie of images and from that function I get cell array of images called cell_dicom. I want to display images in UIAxes acoording to value of Slider component. But with my code I get error for this Slider component. Error says that I have undefined variable cell_dicom. So my first question is why app designer dont save/know this variable, when was defined in other function and how can I fix it? Second problem I have with access to folder with function imshow for Drop Down component. I want to imshow image from folder 'Slidy', but I get error that this folder dont exist althoug this folder 'Slidy' exists next to my application on my computer. Function of components looks like:
% Button pushed function: NastDICOMButton
function NastDICOMButtonPushed(app, event)[File_Name, Path_Name,~ ] = uigetfile('*.dcm','MultiSelect','on')%Nacteni vstupnich dat
[s,z] = size(File_Name);... for i = 1:z cell_dicom {1,i} = im2double(dicomread (File_Name(i,:))); cell_dicom {1,i} = imadjust(cell_dicom {1,i}, stretchlim(cell_dicom {1,i}, 0), []); %Here create cell_dicom
endend% Value changed function: VyberablonuDropDown
function VyberablonuDropDownValueChanged(app, event)value = app.VyberablonuDropDown.Value;if ( value=='Frontální pohled na kmen - schéma pozic řezů altasu' ) imshow('Slidy\schema_rezu.png', 'Parent', app.UIAxes2); %According to app designer dont existing folder Slidy, but exists next to my app.mlapp
...end% Value changed function: SnmekSlider
function SnmekSliderValueChanged(app, event) value = app.SnmekSlider.Value; if ( value==1 ) imshow(cell_dicom{1,1},'Parent', app.UIAxes ) %Here dont know cell_dicom
... end
Best Answer