roots of non linear periodic function
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Mohsin Iqbal
am 5 Mär. 2021
Bearbeitet: Walter Roberson
am 5 Mär. 2021
Hi, i need to find roots of following equation (x). L and P are constants. using fzero i cant, please guid
(x*L)*tan(x*L)=P
i am attempting as follow but fails:
function C(x)
x*L*tan(x*L))=P
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 5 Mär. 2021
Bearbeitet: Walter Roberson
am 5 Mär. 2021
format long g
rng(655321)
L = randn()
P = rand() * 10
C = @(x) x.*L.*tan(x*L)-P
root1 = fzero(C, pi/3)
N = 10;
nroots = zeros(1,N);
proots = zeros(1,N);
for K = 1 : N
nroots(K) = fzero(C, root1-K*pi);
proots(K) = fzero(C, root1+K*pi);
end
uniquetol([nroots, root1, proots].')
0 Kommentare
Weitere Antworten (1)
KSSV
am 5 Mär. 2021
syms x
p = pi/4 ;
L = 2 ;
eqn = x*L*tan(x*L)-p==0 ;
s = vpasolve(eqn,x)
0 Kommentare
Siehe auch
Kategorien
Mehr zu Symbolic Math Toolbox 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!