필터 지우기
필터 지우기

How to solve this equation?

조회 수: 1 (최근 30일)
Sara Boznik
Sara Boznik 2020년 8월 29일
편집: Mario Malic 2020년 9월 4일
Hi everyone,
I want to solve this equation in Matlab. Until now I have the following code:
a=18
b=60
c=76.7
syms x
solx=solve('cos(x).*(a.*sin(x)+b)=c','x')
I get next error: Check for missing argument or incorrect argument data type in call to function 'solve'.
Error in Untitled (line 8)
solx=solve('cos(x).*(a.*sin(x)+b)=c','x')
I dont know what it is wrong, can anybody help me?
Any help is appriciated.
  댓글 수: 4
Kitty Visser
Kitty Visser 2020년 9월 4일
편집: Kitty Visser 2020년 9월 4일
i have also this error
with this function
[V1,V2,V3]=solve('(V1-V2)/R1 = Is + 2*(V3-V2)/R3','(V2 - V1)/R1 + V2/R2 + (V2-V3)/R3 = 0','(V3-V2)/R3 + V3/R4 + 2*(V3-V2)/R3=0','V1','V2','V3')
Mario Malic
Mario Malic 2020년 9월 4일
편집: Mario Malic 2020년 9월 4일
You're missing double equals sign in your equations.

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

채택된 답변

Ali Muhammad Hassaan
Ali Muhammad Hassaan 2020년 8월 29일
a=18
b=60
c=76.7
syms x
eqn = cos(x).*(a.*sin(x)+b) == c
solx=solve(eqn)
  댓글 수: 2
Sara Boznik
Sara Boznik 2020년 8월 29일
Thank you!
Vladimir Sovkov
Vladimir Sovkov 2020년 8월 29일
The sintax is correct here but it is of no help to find the solution, because there is no real-type one, and "solve" refuses working with the complex type. To find the solution you should reformulate the problem as a system of two real-type equations for the real and imaginary parts being two unknown variables.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by