Engineering
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.

answer
Answers: 3

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 18:10, aaliyah80
The drive force for diffusion is 7 fick's first law can be used to solve the non-steady state diffusion. a)-true b)-false
Answers: 1
image
Engineering, 04.07.2019 18:20, mjcbs21
What is the heat treatment of metals? what is the benefit of it? why and how it's useful? answer in details, do not write by hand.
Answers: 3
image
Engineering, 04.07.2019 19:10, justkevin1231
Which of the following is the most important advantage of a large field of view? a. allows larger areas to be examined b. relieves eyestrain c. minimizes parallax errors. d. increases precision in proportion to the in- crease in field of view
Answers: 2
image
Engineering, 04.07.2019 19:10, kayleeemerson77
Analyze the factors that influence the choice between the following pairs of processes to make the products indicated: i) sand casting versus die casting of an electric-motor housing ii) thread rolling versus machining of a bolt for high-strength application. (co3/c5)
Answers: 3
Do you know the correct answer?
Code has already been provided to define a function named vectorFun that accepts a single input vari...

Questions in other subjects:

Konu
Business, 10.12.2020 19:00