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
This note was uploaded on 10/22/2009 for the course CS 1371 taught by Professor Stallworth during the Fall '08 term at Georgia Tech.
- Fall '08