matlab streamline,Matlab 关于streamline的问题

CODE:

clear; clc;

text= load('V.dat');

x=text(:,1);

r=text(:,2);

vx=text(:,3);

dvx=text(:,5);

dvr=text(:,6);

v11=text(:,8);

v21=text(:,9);

%%

Fx = scatteredInterpolant(x(:),r(:),dvx(:));

Fr = scatteredInterpolant(x(:),r(:),dvr(:));

%%

xx=linspace(min(x(:)),max(x(:)),500);

rr=linspace(min(r(:)),max(r(:)),500);

[xgg,rgg]=meshgrid(xx,rr);

xstream = Fx(xgg,rgg);

ystream = Fr(xgg,rgg);

%%

scrsz = get(0,'ScreenSize');

figure1 = figure('Position',[0.05*scrsz(3) 0.05*scrsz(4) 0.9*scrsz(3) 0.9*scrsz(4)]);

[xs,rs] = meshgrid(x,r);

[dvxs,dvrs] = meshgrid(dvx,dvr);

quiver(x,r,dvx,dvr,'r');

numstream=800;

strx=randi([2,99],numstream,1);

stry=randi([0,12],numstream,1);

strx=[strx,strx];

stry=[stry,-stry];

h=streamline(xgg,rgg,xstream,ystream,strx,stry);

set(h,'LineWidth',0.5,'Color','k')

axis equal

axis tight

box on

%% 2nd

figure2 = figure('Position',[0.05*scrsz(3) 0.05*scrsz(4) 0.6*scrsz(3) 0.6*scrsz(4)]);

[xs,rs] = meshgrid(x,r);

[dvxs,dvrs] = meshgrid(dvx,dvr);

quiver(x,r,dvx,dvr,'r');

numstream=800;

strx=randi([2,99],numstream,1);

stry=randi([0,12],numstream,1);

strx=[strx,strx];

stry=[stry,-stry];

h=streamslice(xgg,rgg,xstream,ystream);

set(h,'LineWidth',0.5,'Color','b')

axis equal

axis tight

box on

你可能感兴趣的:(matlab,streamline)