logic2 - elseif x<0 disp('x is less than 0')...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
function[y]=logic2(x) %Example of if-then-else fprintf('example of if-else logic\n') i=2 if x>10 disp('x is greater than 10')
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: elseif x<0 disp('x is less than 0') else if floor(x)==5 disp('x round downward is equal...
View Full Document

Ask a homework question - tutors are online