How to solve this equation?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Sara Boznik
le 29 Août 2020
Modifié(e) : Mario Malic
le 4 Sep 2020
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 commentaires
Kitty Visser
le 4 Sep 2020
Modifié(e) : Kitty Visser
le 4 Sep 2020
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
le 4 Sep 2020
Modifié(e) : Mario Malic
le 4 Sep 2020
You're missing double equals sign in your equations.
Réponse acceptée
Ali Muhammad Hassaan
le 29 Août 2020
a=18
b=60
c=76.7
syms x
eqn = cos(x).*(a.*sin(x)+b) == c
solx=solve(eqn)
2 commentaires
Vladimir Sovkov
le 29 Août 2020
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.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Symbolic Math Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!