Answered step by step
Verified Expert Solution
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 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])]
Help me on matlab problem
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started