How to plot streamlines continuously?

7 ビュー (過去 30 日間)
Niklas Kurz
Niklas Kurz 2021 年 1 月 5 日
編集済み: Niklas Kurz 2021 年 1 月 6 日
So here's my function:
[x,y] = meshgrid(-2:0.2:2);
hold all
dy = (x.^3+y)./(x.^2+y.^2) ;
norm = sqrt(dy.^2+1^2);
quiver(x, y, ones(size(x))./norm,dy./norm,0.75)
startx = -2:0.2:2; %Streamlines
starty = 0.*ones(size(startx));
streamline(x, y, ones(size(x))./norm,dy./norm,startx,starty)
looks pretty decent, but I wish to know how I can plot stream lines starting at each y-values that are 0.2 unity apart from each other. The code above just plots streamlines origining at 0.

採用された回答

Mischa Kim
Mischa Kim 2021 年 1 月 5 日
編集済み: Mischa Kim 2021 年 1 月 5 日
Not entirely sure what you mean. Changing startx and starty values? In your code you set the starting values on the y-axis to 0.
starty = -2:0.2:2; %Streamlines
startx = -2.*ones(size(starty));
  4 件のコメント
Niklas Kurz
Niklas Kurz 2021 年 1 月 6 日
thank you, that's exactly what I wanted. I didn't got used to meshgrid in a wider spectrum yet, but this case helps me to do so.
Niklas Kurz
Niklas Kurz 2021 年 1 月 6 日
編集済み: Niklas Kurz 2021 年 1 月 6 日
One little nuance: Do u know how I set opacity of streamline? I tried patchline add-on and whatnot, but doesn't seem to work.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAxis Labels についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by