Info

This question is closed. Reopen it to edit or answer.

Trying to plot a streamline

1 view (last 30 days)
David Scidmore
David Scidmore on 13 Feb 2021
Closed: John D'Errico on 13 Feb 2021
I am trying to plot a streamline, but for some reason my u and v are returning single values. I'm trying to get the x and y values to go from 0 to 10.
clc
clear all
%%change x to t for time
x = [0:10];
y = [0:10];
E = 2.50;
V = 1;
TV = [1:90];
Pi=3.14;
Psi = E/2;
Psist = -E/(2.*pi.*V);
R = (E/2.*Pi.*V)*((Pi-TV)/sin(TV));
u = V + (E/2.*pi.*R).*x/(x.*x+y.*y);
v = (E/2.*pi.*R).*y/(x.*x+y.*y);
streamline(u,v,0,0)
Error using stream2 (line 46)
U,V must all be size 2x2 or greater.
Error in streamline (line 60)
verts = stream2(u,v,sx,sy,options);
Error in MAE603Fluid (line 16)
streamline(u,v,0,0)
  1 Comment
David Scidmore
David Scidmore on 13 Feb 2021
Figured it out. I needed to do ./ vs /.

Answers (0)

Community Treasure Hunt

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

Start Hunting!