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, 04.07.2019 18:10
Items are similar to the free issue items, but their access is limited. (clo5) a)-bin stock items free issue b)-bin stock controlled issue c)-critical or insurance spares d)-rebuildable spares e)-consumables
Answers: 1
question
Engineering, 04.07.2019 18:10
Which of the following controllers anticipates the future from the slope of errors over time? a)-proportional b)-on/off c)-integral d)-derivative.
Answers: 2
question
Engineering, 04.07.2019 18:20
Prove the equivalence between the two statements of the 2nd law of thermodynamics (i.e., a violation of one statement leads to the violatio the other statement)
Answers: 2
question
Engineering, 04.07.2019 19:10
An electric kettle is made out of stainless steel, weighs two pounds (when empty) and is equipped with a heating element that consumes 2 kw of electricity. assuming that the water and the kettle are at the same uniform temperature at any moment of time, calculate the shortest possible time to bring 2 quarts of water from room temperature to the onset of boiling
Answers: 2
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, 15.02.2021 05:50
question
Mathematics, 15.02.2021 05:50
question
Mathematics, 15.02.2021 05:50
question
Mathematics, 15.02.2021 05:50
question
Mathematics, 15.02.2021 05:50
Questions on the website: 13722367