Undefined function or method 'cmap' for input arguments of type 'double'
Show older comments
[EDIT: 20110602 04:54 CDT - reformat, clarify - WDR]
i get this error when i run the following commands
for i=1:n
prompt = {'Enter image name i:','Enter colormap name i:'};
title = 'Image display - assignin example';
lines = 5;
%def = {'my_image','hsv'};
answer = inputdlg(prompt,title,lines);
assignin('base','imfile',answer{1});
assignin('base','cmap',answer{2});
end
k= ones(5,2);
for i=1:5
k(i,1)=str2double(cmap(i));
k(i,2)=str2double(imfile(i));
end
this works fine when i run them , but when i put these commands in my GUI program (the prompt window is a part of the GUI) then i get the above error
i have been trying it for over 10 days now without a clue towards the problem, pls pls help me
thanks
Accepted Answer
More Answers (0)
Categories
Find more on Red in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!