How to use ‘goto’ statement?
I have the problem in the code segment:
if matchedRulesCount==0
goto(‘N’)
return
else
goto(‘N1’)
return
end
fprintf(‘Number of rules matched are:%dn’,matchedRulesCount);
%LABEL N
disp(‘No rule is fired.’);
%LABEL N1
choice=input(‘Do yo want to try once more? n0. For No.n1. For yes. n’);
I get the following error
??? Undefined function or method ‘goto’ for input arguments of type ‘char’.I have the problem in the code segment:
if matchedRulesCount==0
goto(‘N’)
return
else
goto(‘N1’)
return
end
fprintf(‘Number of rules matched are:%dn’,matchedRulesCount);
%LABEL N
disp(‘No rule is fired.’);
%LABEL N1
choice=input(‘Do yo want to try once more? n0. For No.n1. For yes. n’);
I get the following error
??? Undefined function or method ‘goto’ for input arguments of type ‘char’. I have the problem in the code segment:
if matchedRulesCount==0
goto(‘N’)
return
else
goto(‘N1’)
return
end
fprintf(‘Number of rules matched are:%dn’,matchedRulesCount);
%LABEL N
disp(‘No rule is fired.’);
%LABEL N1
choice=input(‘Do yo want to try once more? n0. For No.n1. For yes. n’);
I get the following error
??? Undefined function or method ‘goto’ for input arguments of type ‘char’. goto statement MATLAB Answers — New Questions