Question: Given variable b that contains a row vector of length 10, assign the contents of the odd indices in b to variable odd , and

 Given variable b that contains a row vector of length 10,assign the contents of the odd indices in b to variable odd

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 0 7 -6 -3 1 8 7 -2] Output odd = [8 0 -6 1 7] even = [-3 7 -3 8 -2] Function C Reset D MATLAB Documenta 1 function [odd even] = OddEven Ind(b) %replace the line below with code to assign to variable odd the contents in the odd indeces of input variable b odd = b; Nm 70 000 %replace the line below with code to assign to variable even the contents in the even indeces of input variable b even= b; end Given variable D that contains a matrix of any size, assign to variable col the contents of the first column in D Examples: Input D = [7 -3 9 4 0 8 -2 -5 4] Output col = [7 4 -2] Input D = [9 -4 -8 5 2] Output col = [9] Function function col = FirstColumn (D) %change the line below so that col is assigned the contents of the first column in D col =D

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!