1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Naily [24]
4 years ago
13

Write a program that asks the user to input a vector of integers of arbitrary length. Then, using a for-end loop the program exa

mines each element of the vector. If the element is positive, its value is doubled. If the element is negative, its value is tripled. The program displays the vector that was entered and the modified vector. Execute the program, and when the program ask the user to input a vector type randi([−10 20], 1, 19). This creates a 19-element vector with random integers between −10 and 20.
Engineering
1 answer:
ELEN [110]4 years ago
4 0

Answer:

%Program prompts user to input vector

v = input('Enter the input vector: ');

%Program shows the value that user entered

fprintf('The input vector:\n ')

disp(v)

%Loop for checking all array elements

for i = 1 : length(v)

   %check if the element is a positive number

   if v(i) > 0

       %double the element

       v(i) = v(i) * 2;

   %else the element is negative number.

   else

       %triple the element

       v(i) = v(i) * 3;

   end

end

%display the modified vector

fprintf('The modified vector:\n ')

disp(v)

You might be interested in
technician a says that the higher the gear selected the more torque is available. technician b says that a transaxle contains ge
umka21 [38]

Technician A is correct. Technician B is wrong because a gear's transmission is used to increase or decrease torque.

The relation torque is relying on multiplying the circumferential detail with the resource of the usage of the radius; massive gears experience a greater amount of torque, at the same time as smaller gears experience a great deal much less torque. Similarly, the torque ratio is equal to the ratio of the gears' radii. A gear's transmission torque modifications as it will boom or decreases speed. Commonly, with the resource of the usage of lowering the speed, a small torque on the doorway issue is transferred as a massive torque at the output issue. The calculation of torque is quantified with the resource of the usage of an extensive form of teeth.

Learn more about the torque at brainly.com/question/28220969

#SPJ4

3 0
1 year ago
Resistance to impact is an example of a(n)
Anika [276]

Answer:

Mechanical property

Explanation:

MECHANICAL PROPERTIES can be defined as the ability of a metal or material to remain undamaged after different type of forces has been applied or used on them because forces or loads are often applied to metal, material or physical properties which is why MECHANICAL PROPERTIES enables us to know the strength , toughness as well as the hardness of metal and the way this metal perform or react when different forces are applied on them.

Lastly any metal, material or physical properties that has the strength , hardness and resistance to withstand or remain unaffected despite the loads or forces use on them is an example of MECHANICAL PROPERTIES.

Therefore Resistance to impact is an example of a(n) MECHANICAL PROPERTIES.

8 0
3 years ago
Select the correct answer.
cricket20 [7]

Answer:

A.

The power generated by a wind farm is not constant because of irregular wind patterns.

5 0
3 years ago
A silicon carbide plate fractured in bending when a blunt load was applied to the plate center. The distance between the fractur
anyanavicka [17]

Answer:

hello your question has some missing values below are the missing values

Mirror Radius (mm) Bending Failure Stress (MPa)

.603                                         225

.203                                         368

.162                                          442

answer : 191 mPa

Explanation:

<u>Determine the stress present at the time of fracture for the original plate</u>

Bending stress ∝ 1 / ( mirror radius )^n ------ ( 1 )

at 0.603  bending stress = 225

at 0.203  bending stress = 368

at 0.162  bending stress = 442

<u>applying equation 1   determine the value of n for several combinations</u>

 ( 225 / 368 ) = ( 0.203 / 0.603 )^n

hence : n = 0.452

also

 ( 368/442 ) = ( 0.162 / 0.203 ) ^n

hence : n = 0.821

also

( 225 / 442 ) = ( 0.162 / 0.603 ) ^n

hence : n = 0.514

Next determine the average value of n

n ( mean value ) =  ( 0.452 + 0.821 + 0.514 ) / 3 = 0.596

Calculate estimated stress present at the time of fracture for the original plate

= bending stress at x =  0.796 / bending stress at x = 0.603

= x / 225 = ( 0.603 / 0.796 ) ^ 0.596

therefore X ( stress present at the time of fracture of original plate )

     = 225 * 0.84747

     <em>=  191 mPa </em>

3 0
3 years ago
Which of the following are tips to help a speaker use their own voice?
djverab [1.8K]
D) All of the above.
4 0
3 years ago
Read 2 more answers
Other questions:
  • The Clausius inequality expresses which of the following laws? i. Law of Conservation of Mass ii. Law of Conservation of Energy
    8·1 answer
  • What happens in double transverse wishbone front suspension when brakes are applied.
    8·1 answer
  • A mercury thermometer has a cylindrical capillary tube with an internal diameter of 0.2 mm. If the volume of the thermometer and
    10·1 answer
  • Read a 4 character number. Output the result in in the following format, Input 9873, Output 3 *** 7 ******* 8 ******** 9 *******
    8·1 answer
  • A 0.50 m3 drum was filled with 0.49 m3 of liquid water at 25oC and the remaining volume was water vapor without any air. The dru
    15·1 answer
  • An engineer is trying to build a new measurement tool. Which step should the engineer complete first? A. Design a model of the t
    8·1 answer
  • Examples of reciprocating motion in daily life
    14·1 answer
  • Thermodynamics fill in the blanks The swimming pool at the local YMCA holds roughly 749511.5 L (749511.5 kg) of water and is kep
    6·1 answer
  • Teaching how to characterize and implement high speed power devices for tomorrow's engineers
    10·1 answer
  • Two technicians are discussing a vehicle that cranks slowly when the key is turned to the crank position. The positive battery t
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!