IsmailJameel
IsmailJameel IsmailJameel
  • 07-07-2020
  • Computers and Technology
contestada

Suppose B = [1, 2 3; 4, 5,6; 7,8,9], write a program with “for” loops that

calculate the square of B.

in MATLAB​

Respuesta :

ronhagrid310
ronhagrid310 ronhagrid310
  • 07-07-2020

Answer:

You don't really need the for loop to calculate B square.

The element-wise multiplication operator can help you get the square of each element of B.

B = [1, 2 3; 4, 5,6; 7,8,9];

B = B.^2;

Hope this helps!

Answer Link

Otras preguntas

Convert a volume of 8950 cm3 to cubic meters.
Identify and describe the three types of government in the English colonies
question in pic! answer asap! will give brainliest!
Which block has the greatest density? Block A Block B Block C Block D Block E
What is the volume of 843.6 g of iron? The density of iron is 7.86 g/mL.
Part 2: Number Properties Answer the questions below. When you are finished, submit this assignment to your teacher by the due date for full credit. Total scor
Will give correct answer brainliest
What is the answer i keep getting this one wrong
Which equation is equivalent to the given equation? 12 + 161 22 OA ( + 8)2 = 86 OB. (1 + 8)2 = 38 Oc. (x + 4)2 = 22 OD. ( + 16)2 = 278
A number y is 6 less than twice a number x. Which equation models this statement? Ay= 6 - 2x By= 6x – 2 Cy= 2x – 6 Dy= 2x + 6