Help with error matrix dimensions must agree
Show older comments
I am trying to graph this streamline function with a rotation T less than B. I keep getting an error that states matrix dimensions must agree for Psi, how do I fix this?
clear all;
clc;
xymax=0.8;
x=linspace(-xymax,xymax,100);
y=linspace(-xymax,xymax,100);
[X,Y]=meshgrid(x,y);
r=sqrt(X.^2 + Y.^2);
sin_th=Y./r;
U=4;
R=0.1;
B= 4*pi*R*U;
T=-8:0.25:B;
Psi=U*(r- R*R./r).*sin_th+((T./(2*pi)).*log(r/R));
figure
contour(X,Y,Psi,-3:0.25:3,'B')
Accepted Answer
More Answers (0)
Categories
Find more on Annotations in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!