Solution to a simple equation

10 次查看(过去 30 天)
Hello all,
I am trying to find a solution to a simple problem, the solution exist but I am unable to get it in the correct format
clear all; close all;
syms R L C omega real
eqn=1 - 2*C*L*omega^2 + C^2*R^2*omega^2 + C^2*L^2*omega^4 == 0
R_soln=solve(eqn,R)
I expect a solution for 'R' by moving all the terms to RHS, and in terms of omega, C, L
However I get the following answer
R_soln =
Empty sym: 0-by-1
This has happened many times before, I am trying to understand why solve cannot give me a solution.
  1 个评论
RAN
RAN 2021-5-17
I got the solution to the problem mentioned, but I cant get it in the format I want.
Since I have explicitly defined the variables as real, Matlab tries to find a real solution which does not exist.
The following works:
clear all; close all;
syms R L C omega
eqn=1 - 2*C*L*omega^2 + C^2*R^2*omega^2 + C^2*L^2*omega^4 == 0
R_soln=solve(eqn,R)
However I just want to rearrange the equation to get all the terms ot RHS except for R.
Any idea how to do it?

请先登录,再进行评论。

采纳的回答

Stephan
Stephan 2021-5-17
use isolate instead of solve:
clear all; close all;
syms R L C omega
eqn=1 - 2*C*L*omega^2 + C^2*R^2*omega^2 + C^2*L^2*omega^4 == 0
eqn = C^2*L^2*omega^4 + C^2*R^2*omega^2 - 2*C*L*omega^2 + 1 == 0
R_soln=isolate(eqn,R)
R_soln = R == ((C*L*omega^2 - 1)*1i)/(C*omega)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Mathematics 的更多信息

标签

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by