Question: Help me on matlab problem function [odd even] = OddEvenlnd(b) %replace the line below with code to assign to variable odd the contents in the

Help me on matlab problem  Help me on matlab problem function [odd even] = OddEvenlnd(b) %replace

function [odd even] = OddEvenlnd(b) %replace the line below with code to assign to variable odd the contents in the odd indices of input variable b b = [8 -3 0 7 -6 -3 1 8 7 2]; odd = b([1, 3, 5, 7, 9]); %replace the line below with code to assign to variable even the contents in the even indices of input variable b even = b([2, 4, 6, 8, 10]); end Pass b = [8 -3 0 7 -6 -3 1 8 7 -2]; odd = [8 0 -6 1 7]; even = [-3 7 -3 8 -2]; [o e] = oddEvenInd(b); assert(isequal([o e], [odd even])] Fail b = [1 2 3 4 5 6 7 8 9 10]; [o e] = oddEvenInd(b); assert(isequal([o e], [odd even])]

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!