Finding Roots between a Differential and Piecewise Equation
Afficher commentaires plus anciens
Hey all!
I am currently working on a project where I have to plot the roots between two of my functions with the help of fzero. I understand that I need to create a third function h(x) where h(x) = g(x) - f(x). But one of the functions is a piecewise equation. Therefore, I am not 100% sure how to find the roots between the two.
This is my piecewise function:
xp1 =@(t) ((-(8*2)/(2^2+1))*cos(t))+((8/(2^2+1))*sin(t));
x1 =@(t) (((8*2)/(2^2+1))+6)*exp(-t/2) + xp1(t);
x2 =@(t) x1(pi)*exp((pi-t)/a);
This is my other function:
fun1 =@(t) (((4+((8*2)/(2^2+1)))*exp(-2*t))+((8/(2^2+1))*(sin(t)-2*cos(t))))
I am able to plot both of them but I dont understand how to find the roots between these two. Any help would be appreciated.
1 commentaire
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Optimization dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!