HI , I WANT TO USE "IF" AND ELSE CONDITIONS IN MATLAB USERDEFINED FUNCTION ?PLZ HELP ME
Show older comments
TELL ME A GOOD BOOK PLZ
Answers (2)
Wayne King
on 7 Apr 2012
Have you just read the MATLAB getting started guide, or the help for if? I think you don't need a book on that alone.
x = 3;
if (x<3)
disp('Do this');
elseif (x>3)
disp('Do this');
else
disp('x is equal to 3.');
end
Categories
Find more on National Instruments Frame Grabbers 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!