Error using plot Vectors must be the same length
情報
この質問は閉じられています。 編集または回答するには再度開いてください。
古いコメントを表示
Hi, I am getting on error this graph plot. Please me
spf.rho=999.62; % kg/m^3, the density of water
spf.mu=1.0093e-3; % viscosity of water
betam=4.4e-10; % compressibility of water
lambda=0.14; % meters, wavelength of the device
rho_p=2650; % kg/m^3, the density of sand
betap=2.16e-10; % compressibility of PMMA
eta=8.94e-4; % viscosity of water
L=0.2; % length of the channel in the x direction
h=0.07; % width of the channel in the y direction
w=0.07; % channel height in the z direction
FontSizeAll=10; % font size for graphs
theta=-60*pi/180; % device tilt angle
N=2000; % number of grid steps
xs=-L/2:L/N:L/2;
ys=-h/2:h/N:h/2;
[x,y]=meshgrid(xs,ys);
dP=0.90; % pressure across the channel driving a flow averaging 2 mm/s
z=0; % midpoint of the channel in channel height.
% calculation of the velocity from profile
sumsection=0;
for n=(0:1:11)
sumsection=sumsection+(32*(1)^n*cosh(((2*n+1)*pi*z)/h).*cos(((2*n+1)*pi.*y)./h))/((2*n+1)^3*pi^3*cosh(((2*n+1)*pi*w)/(2*h))) ;
end
VW=((dP*h^2)/(8*spf.mu*L).*(1-(4.*y.^2./h^2)))-((dP*h^2)/(8*spf.mu*L)).*sumsection; % fluid velocity at each point in the cross section of the channel
P=(0:0.1e5:17e5); % Pa, range of acoustic pressures
R=[1:1:10].*1e-6; % meters, range of particle Radii
plot(VW,G);
0 件のコメント
回答 (1 件)
Mehmed Saad
2020 年 4 月 15 日
size(VW)
ans =
2001 2001
size(G)
ans =
171 10
You cant plot these two against each other
0 件のコメント
この質問は閉じられています。
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!