I am trying to define DY, which is the derivative of Y by using the "diff" command and "matlabFunction()" in order to evaluate Y(0)=1 and DY(0)=2 by using "dsolve". I am having trouble with the "diff" command, the message "Undefined function 'diff' for input arguments of type 'function_handle'." keeps coming up. I have already tried rewriting this multiple ways. Any help would be greatly appreciated. Thank you.
DE = D2y + 4*Dy + 4*y == 0Y = matlabFunction(y)DY = diff(Y)DY = matlabFunction(DY)y = dsolve(DE, Y(0)==1,DY(0)==2)
Best Answer