Numerical Solution
Ältere Kommentare anzeigen
Hi everybody,
I have an equation which is:
i*q=k*sin(q)
I need to use the matlab to find its roots. I want to set a specific values of k like (0.25, 0.5, 1, 2, 3) and find the values of q each time. Thanks in advance folks.
Akzeptierte Antwort
Weitere Antworten (2)
Walter Roberson
am 29 Mai 2012
0 Stimmen
fsolve() or fzero() or one of the minimizers.
2 Kommentare
Abdulaziz
am 21 Jun. 2012
Walter Roberson
am 22 Jun. 2012
fsolve() cannot deal directly with complex functions. Please see
http://www.mathworks.com/matlabcentral/answers/41458-fsolve-and-complex-solution
Image Analyst
am 21 Jun. 2012
Funny, I just copied the example from the help, and never having used fzero before myself, got the answer in about 5 seconds:
i=2 % Pick some sample values.
k=4
f = @(q)i.*q-k.*sin(q); % Replace example equation with Abdulaziz's
% Then find the zero near 2:
z = fzero(f,2)
z = 1.8955
1 Kommentar
Abdulaziz
am 22 Jun. 2012
Kategorien
Mehr zu Solver Outputs and Iterative Display finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!