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

¿Qué van a hacer Uds. después de las clases? -aca ¿Qué vas a hacer este fin de semana? no ¿Qué van a hacer tus amigos en el parque? ad ¿Qué va a hacer el niño e
how did andrew jackson compare the indians removal to death
8. How does the legislative branch check the power of the judicial branch?
fine the slope of 3,0 and -3,-1
What is 1/3, 15/16,49/50, 1/5, 2/5, 7/14, 6/10, 1/12 in smallest to largest
Dr. Gerschivin is a psychologist that teaches people how to relieve pain, cope with chronic illnesses, and to perform self-screenings to prevent diseases, such
Two components of a minicomputer have the following joint pdf for their useful lifetimes X and Y: f(x, y) = xe−x(1 + y) x ≥ 0 and y ≥ 0 0 otherwise (a) What is
10 enunciados con las siguientes acciones bañar,bailar,peinar,dibujar,cepillar​
work out the area of a rectangle with base,b=28mm and perimeter,p=62mm.
A student mixes in a test tube 3.00mL of 0.050M CuSO4with 7.00mL of 0.20M NH3/NH41 . The solution becomes a deep blue color. Assuming all the Cu2 is complexed w