hey guys when i try to run the program it tell me excced number of matrix in line 41 i want to draw p in y axis with V in x axis thank you
clc;clear;B=79.21 a=30.835L=83.919j=0k=0n=0f=0i=0P_i=6RPM=300d_time=(5/360)*(60/RPM)p(k+1)=.99*(P_i)p(k+2)=.9*p(1)T(f+1)=290 R=.287V(1)=27*1000c_d=.6h=8Tw=290cp=1.005m(n+1)=p(1)*V(1)/(R*T(1))for Theta=0:5:360 i=i+1 j=j+1 x(i)=a*cos(Theta)+sqrt((((L*L)-(a*a)*(sin(Theta))^2))) V(j)=(pi/4)*(B^2)*(x(i))+(27*1000)endfor Theta=0:5:360 n=n+1 k=k+1 f=f+1 rho=(p(k)+p(k+1))./(2*R*T(f))if (Theta <=120)d_Mi=c_d*(pi/4)*((.3)^2)*sqrt(2*rho.*(p(k)-p(k+1)))m(n+1)=m(n)+d_MiT(f+1)=(d_time*h*pi*B*x(i).*(2*Tw-T(f))-(p(k)+p(k+1)).*(V(j+1)-V(j))+2*m(n)*cp*T(f))./(2*m(n+1).*cp+(d_time*h*pi*B.*x(i)))p(k+1)=m(n+1).*R*T(f+1)./(v(j+1))endif (Theta >=160) && (Theta <=300) d_Me=c_d*(pi/4)*((.28)^2)*sqrt(2*rho*(p(k)-p(k+1))) m(n+1)=m(n)-d_MeT(f+1)=(d_time*h*pi*B*x(i)*(2*Tw-T(f))-(p(k)+p(k+1))*(V(j+1)-V(j))+2*m(n)*cp*T(f))/(2*m(n+1)*cp+(d_time*h*pi*B*x(i)))p(k+1)=m(n+1)*R*T(f+1)/(v(j+1))endif (Theta >=300) && (Theta <=360) m(n+1)=m(n) T(f+1)=(d_time*h*pi*B*x(i)*(2*Tw-T(f))-(p(k)+p(k+1))*(V(j+1)-V(j))+2*m(n)*cp*T(f))/(2*m(n+1)*cp+(d_time*h*pi*B*x(i)))p(k+1)=m(n+1)*R*T(f+1)/(v(j+1))endif (Theta >120) && (Theta <160)m(n+1)=m(n) T(f+1)=(d_time*h*pi*B*x(i)*(2*Tw-T(f))-(p(k)+p(k+1))*(V(j+1)-V(j))+2*m(n)*cp*T(f))/(2*m(n+1)*cp+(d_time*h*pi*B*x(i)))p(k+1)=m(n+1)*R*T(f+1)/(v(j+1))endend
Best Answer