Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Rotating hyperbola to match a numerical integration

Subject: Rotating hyperbola to match a numerical integration

From: Chris

Date: 3 Mar, 2009 18:53:03

Message: 1 of 2

Hi, I'm try to match a hyperbola to one already computed using the ode45 function for a craft moving through space - only being acted on by the sun's gravity.
I'm getting myself into a whole world of confusion here. I've succesfully managed it with an ellipse by the hyperbolic version is a bit more complicated. If someone could point me in the right direction that would be great! If more information is required, I could upload the file as I have it at the moment.

Cheers,
Chris

rP is the pericenter for both ellipse and hyperbol
a is semi-major axis
b is semi-minor axis
L is angle of rotation

q=(-1:0.01:1)*pi;
        %Ellipse:
        xx=a*cos(q)-(rP)-a;
        yy=b*sin(q);
        x=xx*cos(L)-yy*sin(L);
        y=xx*sin(L)+yy*cos(L);
        %Hyperbol - confused!
        xx=a*cosh(q)+a-rP;
        yy=b*sinh(q)-a+rP;
        x=-(xx*cos(L)-yy*sin(L)-a+rP);
        y=(yy*sin(L)+yy*cos(L)+a-rP);

Subject: Rotating hyperbola to match a numerical integration

From: Chris

Date: 3 Mar, 2009 21:39:02

Message: 2 of 2

The file can be seen here: http://www.mathworks.com/matlabcentral/fileexchange/23167

There is an extra function in the details which is called by the ode45
"Chris " <c.j.crawshaw@googlemail.com> wrote in message <gojuaf$5mj$1@fred.mathworks.com>...
> Hi, I'm try to match a hyperbola to one already computed using the ode45 function for a craft moving through space - only being acted on by the sun's gravity.
> I'm getting myself into a whole world of confusion here. I've succesfully managed it with an ellipse by the hyperbolic version is a bit more complicated. If someone could point me in the right direction that would be great! If more information is required, I could upload the file as I have it at the moment.
>
> Cheers,
> Chris
>
> rP is the pericenter for both ellipse and hyperbol
> a is semi-major axis
> b is semi-minor axis
> L is angle of rotation
>
> q=(-1:0.01:1)*pi;
> %Ellipse:
> xx=a*cos(q)-(rP)-a;
> yy=b*sin(q);
> x=xx*cos(L)-yy*sin(L);
> y=xx*sin(L)+yy*cos(L);
> %Hyperbol - confused!
> xx=a*cosh(q)+a-rP;
> yy=b*sinh(q)-a+rP;
> x=-(xx*cos(L)-yy*sin(L)-a+rP);
> y=(yy*sin(L)+yy*cos(L)+a-rP);

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us