Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Code has already been provided to define a function named vectorFun that accepts a single input variable A that is a column vector of 1
Code has already been provided to define a function named vectorFun that accepts a single input variable A that is a column vector of random numbers with values between and Add commands to do the following operations and assign the results to the indicated output variable names:
Generate a second column vector that consists of only the negative numbers in in the same order in which they occur in
Generate a third column vector that consists of only the positive numbers in A but this time sorted in order from smallest to largest.
Generate a fourth scalar output that counts how many of the elements of A are between and
Solve this problem using vectorized code. Your code should not include the following MATLAB functions or keywords: if for, while. Note the variable is defined as a function input. Do not overwrite the value in your code.
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