How to plot quiver plot to show the velocity profile?

I have this coding and I would like to plot a 2D quiver plot to show the instantaneous velocity but I can't get the right plot.
z=0;
i=0;
y=0;
while(i<1000)
n = 1;
ans=0;
term=0;
while (n<1000)
a=(1/n^3)*(1-(cosh(n*pi*y/h))/(cosh(n*pi*w/(2*h))))*sin(n*pi*z/h);
b=1-(((192*h)/(n^5*pi^5*w))*tanh(n*pi*w/(2*h)));
term=(48*Q*a)/(pi^3*h*w*b);
ans=ans+term;
n=n+2;
end
i=i+1;
result((i+1),1)=ans;
result((i+1),2)=z;
z=h/999*i;
end
xlswrite('Figure6.xlsx',result)
width = xlsread('Figure6.xlsx', 'B:B')
avevelocity = xlsread('Figure6.xlsx', 'A:A')
plot(width,avevelocity);
quiver(X,Y,width,avevelocity)
Any suggestions?? Thank you.

Answers (0)

Categories

Asked:

on 4 Dec 2012

Community Treasure Hunt

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

Start Hunting!