MATLAB Answers

root of nonlinear equation

조회 수: 3(최근 30일)
Lidaou Ali
Lidaou Ali 28 Mar 2020
댓글: Lidaou Ali 28 Mar 2020
i am working on an electical concepts design problem for a emergency exit door release mechanism. I solved the circuit and found that i(t)=0.25*e^(-t/8c)*cos(t/8c)
i want i(t)=0.1 at t=3 sec
i got the code but it doesnt work
%ft=0.25*exp(-3/c)*cos(3/(8*c))-0.1;
%c= fzero(ft,3);
but i cant get result for c
can someone help me?

  댓글 수: 0

댓글을 달려면 로그인하십시오.

채택된 답변

Torsten
Torsten 28 Mar 2020
ft = @( c ) 0.25* ...
instead of
ft = 0.25* ...

  댓글 수: 5

표시 이전 댓글 수: 2
Lidaou Ali
Lidaou Ali 28 Mar 2020
thank you. I am getting different answers for different c values
Torsten
Torsten 28 Mar 2020
If you plot the function, you'll see that it has two roots:
c=-0.238
c=3.297
Lidaou Ali
Lidaou Ali 28 Mar 2020
that is correct. i believe i missed an "8"
the right equation is ft=@(c)0.25*exp(-3/(8*c))*cos(3/(8*c))

댓글을 달려면 로그인하십시오.

추가 답변(0개)

Community Treasure Hunt

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

Start Hunting!

Translated by