Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions