MATLAB: How can ı solve these equations

warning:not enough input arguments.

function dc=pbr(w,c)
dc=zeros(2,1);
Cao=0.0454;
Fao=13.2;
R=0.082;
T=443;
k=1.74;
teta=2.0303;
eps=-0.66;
alfa=0.027;
dc(1,:)=k*Cao*R*T*c(2)*(teta-2*c(1))/((1+eps*c(1))*Fao);
dc(2,:)=-alfa*(1+eps*c(1))/(2*c(2));
[w,c]=ode45(@pbr,[0 1],[0 70]);
plot(w,c(:,1))

Best Answer

This works:
dc=zeros(2,1);
Cao=0.0454;
Fao=13.2;
R=0.082;
T=443;
k=1.74;
teta=2.0303;
eps=-0.66;
alfa=0.027;
pbr = @(w,c) [k*Cao*R*T*c(2).*(teta-2*c(1))./((1+eps*c(1))*Fao); -alfa*(1+eps*c(1))./(2*c(2))];
[w,c]=ode45(pbr,[0 1],[0 70]);
figure(1)
plot(w,c(:,1))
grid
It is much easier to use an Anonymous Function for simple ordinary differential equations such as yours. Please see the section on Anonymous Functions (link) in Function Basics (link).
Some of the problems you are experiencing are because you are not using element-wise operations. See the documentation on Array vs. Matrix Operations (link) for a discussion and use of the dot ‘.’ operator for element-wise multiplication (.*) and division (./).