unction file
function y = f(x,a,A,b,Ttx,gamma_b) y = ((a./A)-(((1+gamma_b)/2)*(b./Ttx))); end
script and error
>> xVec=0:0.01:0.4; %axial combuster length (can be varied according to user input and units)
xi=xVec(1); %station 3 (combuster starting point)
x4=xVec(end);%station 4 (combuster end point)
gamma_b=1.36;%Average value of ratio of specific heat capacities during burning
gamma_c=1.4;%Average value of ratio of specific heat capacities during compression
X=((xVec-xi)/(x4-xi));a3=0.0038;%station 3 cross secion area in m2.
A=a3*(1+X);%Area Profile
a=gradient(A,xVec);%dA/dx in equation (6-90)
a1Vec=a./A; %(dA/dx)/A in equation (6-90)
tau_b=1.5; %Tt4/Tt2 in eq. (6-91) overall total temerature rise in burner
theta=2;%emperical constant in eq. (6-91)
Tt2=2200;%Total temperature at station 2 depends on inlet and compression conditions (USER SPECIFIED)
Ttx=Tt2*(1+(tau_b-1)*((theta*X)./(1+(theta-1)*X)));%Temperature profile eq. (6-91)
b=gradient(Ttx,xVec);%dTt/dx in equation (6-90)
b1Vec=b./Ttx;%(dTt/dx)/Tt in equation (6-90)
fun = @f; % function
x0 = 0; % initial point
z = fzero(fun,x0);Error using fzero (line 289)FZERO cannot continue because user supplied function_handle ==> f failed with the error below. Not enough input arguments.
Best Answer