Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribedimage text in transcribed

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

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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Automating Access Databases With Macros

Authors: Fish Davis

1st Edition

1797816349, 978-1797816340

More Books

Students also viewed these Databases questions

Question

4. Why does happiness resist easy change?

Answered: 1 week ago

Question

c. What were the reasons for their move? Did they come voluntarily?

Answered: 1 week ago

Question

5. How do economic situations affect intergroup relations?

Answered: 1 week ago