finding four solution in an interval

(e^-2x)sin(x+4)=0.4 has four solutions in the interval-5<x <5. how do i find these solutions?

답변 (1개)

Roger Stafford
Roger Stafford 2016년 4월 7일

0 개 추천

Use matlab function 'fzero' to find solution to
fun = @(x) exp(-2*x).*sin(x+4)-0.4;
x = fzero(fun,x0);
where x0 is an approximation for the solution. In your case you will have to do this four times with four different values of x0.

댓글 수: 1

I am using symbolic variables, which are in an array. Here 'A' is my array containing symbolic variable 'b'.
yy = zeros(1,5);
for n = 1:5
yy(n) = vpasolve(det(A)==0,b,[0,100],'Random',true);
end
In this above code, I am using for loop. Here I am running it 5 times which will give me 5 solutions in that interval. Is there any way to get all solutions in a particular function.

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

카테고리

태그

질문:

2016년 4월 7일

댓글:

2022년 1월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by