MATLAB: Is it posibile in matlab, jump to others command if a=1( i dont want if a~=1)

endifopposite

this is opposite of 'if-end' command.i need if something happens then don't do some certain command. for example:
if a==1 don't do under command until end
commands
end
other command %that if a=1 then jump here
its not needed 'if a~=1' because there are a lot of cases that a~=1 but needs command after 'if', be run too.

Best Answer

There is no "goto" command in MATLAB if that is what you are looking for. There should be other ways to control your code flow if you could elaborate your need.
Maybe consider "switch-case". help switch. Change the value of a below to see the effect.
a=1;
switch num2str(a)
case {'2','3'}
disp('a is 2 or 3');
case {'1','4','5'}
disp('a is 1 or 4 or 5');
otherwise
disp('a is not valid');
end