I got a matrix dimensions error while plotting a pressure field

1 visualizzazione (ultimi 30 giorni)
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

Risposta accettata

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

Più risposte (0)

Categorie

Scopri di più su Contour Plots in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by