Question
Write a MATLAB script check02 that prompts for user input of a vector Yin and displays on the screen two vectors Yplus and Yminus
Write a MATLAB script check02 that prompts for user input of a vector Yin and displays on the screen two vectors Yplus and Yminus such that Yplus and Yminus contain the positive and negative values entered in Yin, respectively. In case one of these two output vectors does not have any element (that is empty), it will show an empty matrix. Test your code with: (a) [18, -5, 89, -7, 4, 10, 12, 34, -2, 45]; (b) [34, 67, 89, 0, 12, 87, 0, 5]; Note: initialize vectors Yplus and Yminus as 0-by-0 empty matrices using: >> Yplus = []; Yminus = [ ]
Step by Step Solution
3.42 Rating (155 Votes )
There are 3 Steps involved in it
Step: 1
Here is a MATLAB script named check02 that fulfills the requirement of separating positive and ...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 StartedRecommended Textbook for
Signals and Systems using MATLAB
Authors: Luis Chaparro
2nd edition
123948126, 978-0123948120
Students also viewed these Programming questions
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
View Answer in SolutionInn App