How to plot the streamlines and arrow surface in MATLAB from columns of data?

16 ビュー (過去 30 日間)
Bacha Munir
Bacha Munir 2023 年 3 月 2 日
コメント済み: Bacha Munir 2023 年 3 月 2 日
Hello dears. I have attched data in the form of columns for plotting streamlines and arrow surface. How can I plot them both in one figure?. Thank you.

採用された回答

KSSV
KSSV 2023 年 3 月 2 日
clc ; clear all ;
% T = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1311670/streamlines%20plot.txt',....
% 'HeaderLines',8) ;
T = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1311675/arrow%20surface%20plot.txt',...
'HeaderLines',8) ;
x = T.(1) ; y = T.(2) ;
u = T.(3) ; v = T.(4) ;
quiver(x,y,u,v)
  4 件のコメント
KSSV
KSSV 2023 年 3 月 2 日
T = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1311670/streamlines%20plot.txt',....
'HeaderLines',8) ;
x = T.(1) ; y = T.(2) ;
streamline = T.(3) ;
[c,ia,ib] = unique(streamline);
figure
hold on
for i = 1:length(c)
plot(x(ib==i),y(ib==i)) ;
end
Bacha Munir
Bacha Munir 2023 年 3 月 2 日
Yes. Great Job. Thank you so much.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by