How can I declare an implicit variable, y(t), after I have used it in a symbolically defined function?
I’m writing a scheme that solves an ODE and in doing so I declare a symbolic function:
syms t y(t)
f = t^(-2) * (sin(2*t) – 2*t*y)
At one point I have to take a total derivative, so I need to be be implicit in the expression, but I also need to evalute at a specific value of and . I attempt to do this in the following lines.
y(t) = wi;
out(1) = f(ti);
However, I am prompted with the following error.
The following error occurred converting from sym to double:
Unable to convert expression containing remaining symbolic
function calls into double array. Argument must be
expression that evaluates to number.
Error in DiffEq_alt (line 13)
out(1) = f(ti);
Ultimately, I need to be able to be able to declare explicitly, but also treat it implicitly for when I differentiate the function with respect to .I’m writing a scheme that solves an ODE and in doing so I declare a symbolic function:
syms t y(t)
f = t^(-2) * (sin(2*t) – 2*t*y)
At one point I have to take a total derivative, so I need to be be implicit in the expression, but I also need to evalute at a specific value of and . I attempt to do this in the following lines.
y(t) = wi;
out(1) = f(ti);
However, I am prompted with the following error.
The following error occurred converting from sym to double:
Unable to convert expression containing remaining symbolic
function calls into double array. Argument must be
expression that evaluates to number.
Error in DiffEq_alt (line 13)
out(1) = f(ti);
Ultimately, I need to be able to be able to declare explicitly, but also treat it implicitly for when I differentiate the function with respect to . I’m writing a scheme that solves an ODE and in doing so I declare a symbolic function:
syms t y(t)
f = t^(-2) * (sin(2*t) – 2*t*y)
At one point I have to take a total derivative, so I need to be be implicit in the expression, but I also need to evalute at a specific value of and . I attempt to do this in the following lines.
y(t) = wi;
out(1) = f(ti);
However, I am prompted with the following error.
The following error occurred converting from sym to double:
Unable to convert expression containing remaining symbolic
function calls into double array. Argument must be
expression that evaluates to number.
Error in DiffEq_alt (line 13)
out(1) = f(ti);
Ultimately, I need to be able to be able to declare explicitly, but also treat it implicitly for when I differentiate the function with respect to . symbolic, differential equations, r2020b MATLAB Answers — New Questions