MATLAB: Derivative in syms syms If I am using syms, and i have the following a = b * u then da/dt = b * du/dt. How do I get matlab to do this rather than just assume u is not a function of t and assign a value of 1? Best Answer You tell MATLAB that u is a function of t.a = subs(a,'u','u(t)');diff(a,'t') Related SolutionsMATLAB: Sym Use vpa, e.g.,c = vpa(a*b,4) MATLAB: How to get symbolic output notation, exp(1)=e syms u(x);sympref('FloatingPointOutput',false);Du=diff(u);ode=diff(u,x,2)==4*uode(x) = cond1=u(0)==0cond1 = cond2=Du(1)==exp(sym(2))-exp(sym(-2))cond2 = conds=[cond1 cond2];uSol(x)=dsolve(ode,conds)uSol(x) = uSol = simplify(uSol)uSol(x) = Related QuestionSym and symsUsol(x) = [ empty sym ] for using dsolve with the following nonlinear 3rd oder ODE
Best Answer