Question: x = linspace(-5,5,201); y = linspace(-5,5,201); U = [ 1 5 10 20]; a = [ 1 5 5 5]; disp('r =') r = x.^2+y.^2

x = linspace(-5,5,201);

y = linspace(-5,5,201);

U = [ 1 5 10 20];

a = [ 1 5 5 5];

disp('r =')

r = x.^2+y.^2

disp('theta =')

theta = atan(y./x)

for k = 1:length(a)

for i = 1:length(r)

for j = 1:length(theta)

vr(i,j) = U(k)*1-((a(k)^2/r(i)^2))*cos(2theta)

end

end

subplot(2,2,i)

quiver(x,y,vr,vt)

end

vr = u (1-a^2/r^2*cos(2theta) i keep getting an error every time put it in Matlab can u help correct my code for any errors

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!