I got a matrix dimensions error while plotting a pressure field

1 visualización (últimos 30 días)
I got this error while trying to plot a pressure field. I have pressure P in terms of x and y:
[X1,Y1] = meshgrid(0:0.01:3,0:0.01:-0.005);
p = 101325-1/2*1.225*(900+(90/pi)*(X1/(X1^2+Y1^2))+9/(4*pi^2*(X1^2+Y1^2)));
Error using /
Matrix dimensions must agree.
I tried adding a dot before / but it still gives me the same error
I need to have p in terms of X1,Y1 and plot it using contour

Respuesta aceptada

Walter Roberson
Walter Roberson el 20 de Oct. de 2020
p = 101325-1/2*1.225*(900+(90/pi)*(X1./(X1.^2+Y1.^2))+9./(4*pi^2*(X1.^2+Y1.^2)));

Más respuestas (0)

Categorías

Más información sobre Contour Plots 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