필터 지우기
필터 지우기

i am new to matlab. I am trying to solve implicit equation in matlab using fsolve and and fzero command but getting error. Please guide

조회 수: 2 (최근 30일)
syms x, L % x and L both are variables
detr=2*x*cos(L*x) - x - x*cos(L*x)^2 - x*sin(L*x)^2 + L*x^2*sin(L*x)
sol1=fzero(detr, 0)
sol2 = fsolve(detr,0)
Error: If FUN is a MATLAB object, it must have an feval method.

답변 (1개)

Walter Roberson
Walter Roberson 2016년 5월 1일
You cannot use fzero or fsolve for symbolic expressions. You need to use either solve or vpasolve.
You only have one equation in two variables, so there is no unique solution. There are solutions at x = 0, L = 0, x*L = 2 * Pi * (Any Integer), and x*L = RootOf(sin(Z)*Z^2+4*sin(Z)-4*Z, z) . The 2 * Pi * (Any Integer) has an infinite number of solutions, and the RootOf(sin(Z)*Z^2+4*sin(Z)-4*Z, z) has an infinite number of solutions

카테고리

Help CenterFile Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by