Tring to solve for a transcendental equation
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Tyler Derstine
am 17 Okt. 2021
Beantwortet: Alan Stevens
am 17 Okt. 2021
Hi,
I am tring to solve a transcendental equation.
L=0:.005:.15;
syms eigen
Bi=(100*L)/1.5
eigen=Bi/tan(eigen)
I want to find the value for eigen. I have not been able to figure out how to do this. All I have gotten is it outputting equations. How can I go about this to solve for eigen.
Thanks
0 Kommentare
Akzeptierte Antwort
Alan Stevens
am 17 Okt. 2021
You can rearrange the equation as eigen*tan(eigen) = Bi and use fzero as below. However, because of the nature of tan, your results will depend on your initial guesses.
L=0:.005:.15;
Bi=(100*L)/1.5;
eigen = zeros(1,numel(L));
eig = 1; % Initial guess
for i = 1:numel(L)
eigen(i) = fzero(@(eig) efn(eig,Bi(i)),eig);
end
function Z = efn(eig, Bi)
Z = eig*tan(eig) - Bi;
end
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!