How to plot a transcendental equation in matlab (R2017b)?
8 views (last 30 days)
Show older comments
Here are the constants/variables:
smaje=1.496*10^(8);
ecce=0.0167;
smine=smaje*((1-((ecce)^(2)))^(1/2));
xearth=[-smaje:10:smaje];
earthpos=((smine^2)-(smine^2).*((xearth.^2)./(smaje^2))).^(1/2);
th=(0.1383561324)*pi/2;
Now here is the problem: I want to plot to plot the following equation on a graph:
earthpos.*(cos(th))^2 = (((((smine^2)/(smaje^2)).*(smaje^2-(xearth*cos(th)+earthpos*sin(th)).^2)).^(1/2)).*cos(th)+xearth*cos(th)*sin(th));
earthpos contains the y-coordinates while xearth contains x-coordinates.
1 Comment
Walter Roberson
on 22 Mar 2018
Do you mean that you want to put a marker at -16222020, 148697134.657321 which is the approximate location of where
earthpos.*(cos(th))^2 == (((((smine^2)/(smaje^2)).*(smaje^2-(xearth*cos(th)+earthpos*sin(th)).^2)).^(1/2)).*cos(th)+xearth*cos(th)*sin(th))
is true?
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!