Need help finding intersection of two curves using fzero function
Afficher commentaires plus anciens
I'm new to MatLab (just started using it 2 days ago), and currently my goal is for the program to spit out the values of the points of intersections of two curves using the fzero command. This is my code:
syms x
y1 = x^8;
y2 = power(4,x);
f(x) = y1-y2;
fzero (f,-0.86)
The x value of the point of intersection is supposed to be x=-0.861345, however when I enter this code in, it outputs
ans =
-0.8357
, which isn't the correct value. When I change the value of the number inside the fzero command, it outputs a different number each time. How do I fix this? Thank you.
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!