MATLAB Answers

0

getting an error that attempt to run script as a function? what should be done to rectify?

Asked by Shan Sha on 12 Oct 2018
Latest activity Commented on by madhan ravi
on 12 Oct 2018
Attempt to execute SCRIPT get_im_label as a function: G:\pro\letrist-master\helpfun\get_im_label.m
Error in demo_CURET (line 25) imageDatasetLabel = get_im_label(imdir); This is the error i am getting. how to modify? my code is attached here.

  0 Comments

Sign in to comment.

1 Answer

Answer by madhan ravi
on 12 Oct 2018
Edited by madhan ravi
on 12 Oct 2018
 Accepted Answer

You have saved get_im_label as a script instead of a function look into the error message as it clearly states the error.
Usage:
get_im_label(imdir)

  2 Comments

Array indices must be positive integers or logical values.
Error in get_im_label (line 14) if ~strcmp(dataname(j).name(end-1:end),'db') % ËÎ
Error in demo_CURET (line 25) imageDatasetLabel = get_im_label(imdir);
what is this error? howv to modify
Read the link I posted in answer , take your time to understand.

Sign in to comment.