{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

logic2 - disp'x is less than 0 else if floor(x)==5 disp'x...

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') elseif x<0
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: disp('x is less than 0') else if floor(x)==5 disp('x round downward is equal to five') else disp('x is between 0 and 10')...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online