how do I find the value of E
2 views (last 30 days)
Show older comments
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?
0 Comments
Answers (1)
Walter Roberson
on 2 Jan 2021
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.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!