HW2prob2 - % & -48) from...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 clear clc %========================================================================== % PROBLEM 2. Indexing Vectors %-------------------------------------------------------------------------- % % You are given a vector "vec", defined as: vec = [45 8 2 6 98 55 45 -48 75] % In a brief moment of insanity you decide that you don't like even numbers. % Write the Matlab commands to remove all of the even numbers (ie, 8,2,6,98,
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: % & -48) from "vec". You should alter the vector "vec" rather than storing % your answer in a new variable. Remember, don't use direct entry. Your % code should perform some operations on the vector "vec". You may (but are % not required to) use more than one line of code to solve the problem. Sheet1 Page 2 mask = [true false false false false true true false true] vec = vec(mask)...
View Full Document

Page1 / 2

HW2prob2 - % & -48) from...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online