Hello All,
Trying to solve this ODE.
clear,clcsyms y(t) x2(t) x1(t) a bdy=diff(y,t);ode = diff(y,t,2) == a.*d) + b.*y - diff(x2,t)./10 + x1;cond1 = y(0)==0;cond2 = dy(0)==0;conds=[cond1 cond2];sol1=dsolve(ode,conds)t=(0:.1:20);x2(t)=20.*heaviside(t);x1(t)=0;out=eval(sol1);plot(t,out)%%%% Getting this error %%%%Error using evalMust be a string scalar or character vector.Error in Homework_1 (line 14)out=eval(sol1);
Best Answer