subject
Engineering, 04.09.2020 22:01 alexkoval1231

Code has already been provided to define a function named vectorFun that accepts a single input variable A that is a column vector of 100 random numbers with values between -50 and 50. Add commands to do the following operations and assign the results to the indicated output variable names: 1. Generate a second column vector B that consists of only the negative numbers in A in the same order in which they occur in A. 2. Generate a third column vector C that consists of only the positive numbers in A but this time sorted in order from smallest to largest 3. Generate a fourth scalar output D that counts how many of the elements of A are between -20 and 20. Your code should NOT include the following MATLAB functions or keywords: if, for, while. Note the variable A is defined as a function input. Do not overwrite the value in your code.

ansver
Answers: 3

Another question on Engineering

question
Engineering, 03.07.2019 23:20
Two technicians are discussing the intake air temperature (iat) sensor. technician a says that the computer uses the iat sensor as a backup to the engine coolant temperature (ect) sensor. technician b says that the powertrain control module (pcm) will subtract the calculated amount of fuel if the air measures hot. who is correct
Answers: 3
question
Engineering, 04.07.2019 16:10
The force on a cutting tool are 2600n vertically downward and 2100 horizontal. determine the resultant force acting on the tool and the angle at which it acts.
Answers: 1
question
Engineering, 04.07.2019 18:10
An air conditioning system consist of a 5 cm diameter pipe, operating at a pressure of 200 kpa. the air initially enters the pipe at 15°c with a velocity of 20 m/s and relative humidity of 80%. if the heat supply throughout the process is 960 w, determine the relative humidity and the temperature at the outlet
Answers: 3
question
Engineering, 04.07.2019 18:10
The higher the astm grain-size number, the coarser the grain is. a)-true b)-false
Answers: 3
You know the right answer?
Code has already been provided to define a function named vectorFun that accepts a single input vari...
Questions
question
Mathematics, 12.11.2019 20:31