Info
This question is closed. Reopen it to edit or answer.
Error when using a cell as a property in app designer
1 view (last 30 days)
Show older comments
Hello, I am using app designer and I am trying to save 2d image matrices into a cell. I am able to do this, and verified it in just regular matlab script. Since I want this data to be shared across the app, I am making the cell into a shared property so that other apps can do this. However, when I pull the data from the cell for some image, I get an error that brace indexing is not supported. I am not sure why, since I was able to do this earlier. I have attached some snippets of the code, does anyone know what I may be doing wrong? I want app.TOOLdata to be the cell in which I can find each image file, I will be using multiple image files with different sizes so I cannot concatenate them, so i think using a cell is required.
I = imread(filename);
if ndims(I) == 2 %#ok<ISMAT>
else
I = rgb2gray(I); %sets to grayscale if not already
end
if isa(I, 'double')
else
I = im2double(I); %sets to double if not already
end
app.TOOLdata{1} = I;
%%%another line where I get the error%%%
IM = app.TOOLdata{app.FrameEditField.Value}; %displays error (brace indexing not supported), in this case the frame is 1.
0 Comments
Answers (0)
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!