I have a problem with programming. I want to handle error since it would be work well. For example in following example i will be increase index to positive value till there is no error anymore :
i=-10;
try
result=a[i];
disp('success');
end
catch
i=i+1;
end
It is just simple example to express my problem. I will really appreciate, if anyone could help me.
ifstatement to check ifi < 1.