Question: Use Matlab plz!!!!!!!!!!!!!!! Problem Description Given variable b that contains a row vector of length 10, assign the contents of the odd indices in b
Use Matlab plz!!!!!!!!!!!!!!!

Problem Description Given variable b that contains a row vector of length 10, assign the contents of the odd indices in b to variable odd, and assign the contents of the even indices of b to variable even. (Psst! the plural of index is indices. This has been your SAT vocabulary booster of the day) Examples: Input b = [8-3 7-6-3 1 8 7-2] Output odd = [8 -6 1 7] even =[-3 7-3 8-2] Solution MATLAB Documentation function [odd even] = 0ddEven1nd (b) 3 %replace the line below with code to assign to variable odd the contents in the odd indeces of 15 6 odd b(1:2:10); = %replace the line below with code to assign to variable even the contents in the even indeces 01 even= b(2:2:10); 9 10 end Resef Test Submit You have unlimited submissions Test Suite
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
