how do I find the value of E

2 ビュー (過去 30 日間)
Kristiyanto Adi W
Kristiyanto Adi W 2021 年 1 月 2 日
回答済み: Walter Roberson 2021 年 1 月 2 日
Hello. I'm beginner at Matlab
I want to find the value for E using the "solve" code
clear all;
clc;
syms E
M=1;
y=0.1;
L=1;
a=0.01;
n=1;
u = -(E^2 - M^2);
v = 1 + 2*(E^2 - M^2)*a;
alpha = -(1/2) + sqrt((1/4) + ((u/v) + (1/(2*a)))*(1/(y^2)));
S = (y^2)*((L - alpha - 2*n)^2)-(u/v)==0;
solve(S)
but I got this answer
ans =
Empty sym: 0-by-1
what code should I use?

回答 (1 件)

Walter Roberson
Walter Roberson 2021 年 1 月 2 日
There is no root. The equation can be normalized to
sqrt((E^2 + 1000049)/(E^2 + 49))/200 + 10001/200
In order for that to be 0, the sqrt() would have to come out real and negative, but that cannot happen: if the sqrt() is of a positive real value, then the sqrt() is positive; if the sqrt() is of a negative real value, then the sqrt() is complex valued; if the sqrt() is of a complex value, the the sqrt() is complex. So, no roots.

Community Treasure Hunt

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

Start Hunting!

Translated by