Unformatted text preview: % whether Y is "odd", "even" or a "decimal". The switch should set B to % the string 'even','odd', or 'decimal' accordingly. Replace every ? with % the necessary code. You MUST use a SWITCH statement to receive credit % for this problem. switch mod(Y, 2) % change this line case 0 % change this line B = 'even'; case 1 % change this line B = 'odd'; otherwise B = 'decimal'; end e % c) any. X is a vector of logicals. Use the any( ) function to check if % any of the values of X is TRUE. Return a logical true or false % accordingly. Store your result in a variable named C. C = any(X);%fill in this line C % d) all. Use the all( ) function to check if all of the values of X % are TRUE. Return a logical true or false accordingly. Store your result % in a variable named D. D = all(X);%fill in this line...
View Full Document
- Fall '08
- Greek alphabet, Lower case, Switch statement