Question: Matlab 3) given a vector D =[ -4 ,-3 ,-2. -1. ,0. 1. ,2.,3. ,4] write an mfile named sirter.m, using iteration (for and/or while)
3) given a vector D =[ -4 ,-3 ,-2. -1. ,0. 1. ,2.,3. ,4] write an mfile named sirter.m, using iteration (for and/or while) and conditionals (if and/or else) to separate D into the following vectors. (1) posEven that contains + even numbers in D [2, 4] (ii ) negEven that contains -even numbers in D [-4, -2] (iii ) posOdd that contains +odd numbers in D [1, 3] (iii) negOdd that contains -odd numbers in D
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
