How do I type this equation?

1 visualización (últimos 30 días)
Noah Kebschull
Noah Kebschull el 25 de Nov. de 2017
Editada: Walter Roberson el 25 de Nov. de 2017
I need to write the equation
P = (10/(R+20))^2
When R starts at 0 and ends at 40 with step size of 0.1. So far, I have
R = [0:0.1:40];
P = R * (10/(R + 20))^2.
I've tried a few different ways, and I keep getting error message Matrix Dimensions Must Agree. How would I do this? I'm still very new to Matlab and I'm don't understand how everything works.

Respuesta aceptada

Walter Roberson
Walter Roberson el 25 de Nov. de 2017
Editada: Walter Roberson el 25 de Nov. de 2017
P = R .* (10./(R + 20)).^2.

Más respuestas (0)

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by