how do I solve a non linear function
Mostrar comentarios más antiguos
Hi I am trying to solve this function but I keep on getting a warning sign I am unsure to howto put solve for a non liner function
syms t
y = 4*sin(2*pi*t) + exp(-t)./t
eqn = y -- 0
solv =solve(eqn,t)
figure
fplot(y,[-3 10])
grid
3 comentarios
Torsten
el 4 de Ag. de 2022
What do you want to see as result from "solve" ?
An explicit formula for all zeros of your nonlinear function ? Such a formula does not exist.
All zeros in between a certain range as numerical values ? Such an option for a solver does not exist.
One zero of the function ? vpasolve gives you one such value out of an infinite number of possible solutions.
sumaiya hossain
el 4 de Ag. de 2022
You can restrict the search for a solution to a specific interval, e.g.
syms t
y = 4*sin(2*pi*t) + exp(-t)./t;
eqn = y == 0;
solv =vpasolve(eqn,t,[0,1])
solv =vpasolve(eqn,t,[1,2])
figure
fplot(y,[0.1 2])
grid
Respuestas (0)
Categorías
Más información sobre Symbolic Math Toolbox en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

