Warning: Imaginary parts of complex X and/or Y arguments ignored.
Show older comments
Error when attempting to plot ,the first imaginary result comes from Q3 afterwards everything that involves Q3 results as imaginary , i tried doing q3=sqrt(h3)*k; Q3=real(q3); and got rid of the imaginary result (i think) but when trying to plot my plot is empty
%% initial data
p32 = [1.22 1.225 1.225 1.22 0.765 0.085];
p33 = [0.660 0.660 0.665 0.655 0.435 0.085];
p34 = [0.830 0.830 0.830 0.815 0.540 0.105];
p39 = [0.705 0.705 0.730 0.690 0.460 0.085];
p40 = [0.410 0.410 0.405 0.400 0.285 0.090];
d=0.051;
k=0.064;
niu=1.01*10^(-6);
g=9.81;
L1=0.5 ;
L2= 1;
L=1.5;
%%
h1=p32-p33;
h2=p34-p39;
h3=p39-p40;
Q1=sqrt(h1)*k;
Q2=sqrt(h2)*k;
Q3=sqrt(h3)*k
S=(pi*d^2)/4;
V1=Q1/S;
V2=Q2/S;
V3=Q3/S;
Re1=(V1*d)/niu;
Re2=(V2*d)/niu;
Re3=(V3*d)/niu;
j1=h1/L;
j2=h2/L;
j3=h3/L;
he1=h1+j1*(L1+L2);
he2=h2+j2*(L1+L2);
he3=h3+j3*(L1+L2);
re1=Q1*4/pi*d^2;
re2=Q2*4/pi*d^2;
re3=Q3*4/pi*d^2;
zita1=he1*2*g/(re1.^2);
zita2=he2*2*g/(re2.^2);
zita3=he3*2*g/(re3.^2);
he1=zita1*re1.^2/2*g;
he2=zita2*re2.^2/2*g;
he3=zita3*re3.^2/2*g;
%%
figure
plot(Re1,real(zita1),'c');hold on;
plot(Re2,real(zita2),'r');
plot(Re3,real(zita3)','g');
grid on;axis tight;
Accepted Answer
More Answers (0)
Categories
Find more on Audio and Video Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!