Effacer les filtres
Effacer les filtres

find numerical solution of a function

2 vues (au cours des 30 derniers jours)
letoppina
letoppina le 5 Juil 2018
Hi everyone,
I need to find the numerical solution for my parameter (V) of the following function that does not have an explicit analytical resolution:
I know the range of the solution of my parameter (between 0 and 10) so I was thinking to define a linspace vecotr for V and then find the possible roots of my function. How do I do that? Are there better methods?
Thank you in advance for your help!

Réponses (2)

Matt J
Matt J le 5 Juil 2018
Modifié(e) : Matt J le 5 Juil 2018
Use fzero:
V=fzero(@yourFunction, [0,10])
  1 commentaire
letoppina
letoppina le 5 Juil 2018
it's not working. Can you show me how to code it?

Connectez-vous pour commenter.


Torsten
Torsten le 5 Juil 2018
f0=...;
R=...;
alpha=...;
C0=...;
gamma0=...;
r=...;
L=...;
beta=...;
omega=...;
yourFunction = @(V)4*f0*R*alpha-V*alpha/C0-V*alpha*(1-gamma0*exp(-r/(2*L*omega)*atan(beta/(L*omega*V*alpha)))*sqrt(1+(beta/(L*omega*V*alpha))^2));
V=fzero(yourFunction, [0,10])

Catégories

En savoir plus sur NaNs dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by