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:
Matlab runtime error!

Subject: Matlab runtime error!

From: Ender

Date: 29 Sep, 2010 16:33:21

Message: 1 of 7

Could someone tell me what this error means and how do I fix it?

I am running a Matlab program with 3 .m files. I am using the ode45 solver twice in the program. The second time I use the ode45 solver, the solver runs then I get an error that says

Fatal internal error. [c0000094]
Runtime Error!

R6025
-pure virtual function call

Then MATLAb shuts down.
How do I fix this error and finish the program run.

Thanks,

--Ender--

Subject: Matlab runtime error!

From: Steven_Lord

Date: 29 Sep, 2010 16:40:59

Message: 2 of 7



"Ender " <jr147@msstate.edu> wrote in message
news:i7vpoh$7m7$1@fred.mathworks.com...
> Could someone tell me what this error means and how do I fix it?
>
> I am running a Matlab program with 3 .m files. I am using the ode45
> solver twice in the program. The second time I use the ode45 solver, the
> solver runs then I get an error that says
>
> Fatal internal error. [c0000094]
> Runtime Error!
>
> R6025
> -pure virtual function call
>
> Then MATLAb shuts down.
> How do I fix this error and finish the program run.

If the function that you're passing into ODE45 invokes one or more MEX-files
as part of its evaluation, you need to debug why the MEX-file is trying to
invoke a pure virtual function.

If it does not, then please send everything (data files, program files,
etc.) including the exact call to ODE45 that you make to Technical Support
so they can investigate the cause of this problem.

--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Subject: Matlab runtime error!

From: Ender

Date: 29 Sep, 2010 16:47:20

Message: 3 of 7

I have narrowed down the problem as to why I get this error, but I am still unsure how the error is caused.

I have an equation in the ode45 solver program that states;

% create variables to solve for a two-body motion equation
    syms E_cal

e = ELE(2);
M_o = ELE(6);

% solve the equation for the Eccentric Anomaly
        
        E_cal = solve(E_cal-e*sin(E_cal)-M_o,E_cal);
        
        % Convert to a number from a string variable
            E = subs(E_cal);
        
        % Convert to degrees (deg)
            E = radtodeg(E);

I would like to get a value for E. I pass over M, e from the preceding .m file However whenever MATLAB tries to solve for E_cal, I then get the error and MATLAB shuts down. If there is an easier way to solve for E (in degrees) then how I have written the code please tell me. If not can someone tell me why and how to fix the problem.

Thanks,
--Ender--


"Ender " <jr147@msstate.edu> wrote in message <i7vpoh$7m7$1@fred.mathworks.com>...
> Could someone tell me what this error means and how do I fix it?
>
> I am running a Matlab program with 3 .m files. I am using the ode45 solver twice in the program. The second time I use the ode45 solver, the solver runs then I get an error that says
>
> Fatal internal error. [c0000094]
> Runtime Error!
>
> R6025
> -pure virtual function call
>
> Then MATLAb shuts down.
> How do I fix this error and finish the program run.
>
> Thanks,
>
> --Ender--

Subject: Matlab runtime error!

From: Walter Roberson

Date: 29 Sep, 2010 17:25:05

Message: 4 of 7

On 10-09-29 11:47 AM, Ender wrote:

> I have an equation in the ode45 solver program that states;
>
> % create variables to solve for a two-body motion equation
> syms E_cal
>
> e = ELE(2);
> M_o = ELE(6);
>
> % solve the equation for the Eccentric Anomaly
> E_cal = solve(E_cal-e*sin(E_cal)-M_o,E_cal);

There is no analytic form for E_cal unless e or M_o are 0, so you might as
well use a numeric solver for this.

 > % Convert to a number from a string variable
 > E = subs(E_cal);

subs() will not convert to a floating point number from a symbolic number: you
would need double() for that.

Subject: Matlab runtime error!

From: Ender

Date: 29 Sep, 2010 17:32:38

Message: 5 of 7

Numerical Solver??

Such as Newton's Method?

Does MATLAB have any built in solvers that I can use?

--Ender--

Walter Roberson <roberson@hushmail.com> wrote in message <i7vsuq$p76$1@canopus.cc.umanitoba.ca>...
> On 10-09-29 11:47 AM, Ender wrote:
>
> > I have an equation in the ode45 solver program that states;
> >
> > % create variables to solve for a two-body motion equation
> > syms E_cal
> >
> > e = ELE(2);
> > M_o = ELE(6);
> >
> > % solve the equation for the Eccentric Anomaly
> > E_cal = solve(E_cal-e*sin(E_cal)-M_o,E_cal);
>
> There is no analytic form for E_cal unless e or M_o are 0, so you might as
> well use a numeric solver for this.
>
> > % Convert to a number from a string variable
> > E = subs(E_cal);
>
> subs() will not convert to a floating point number from a symbolic number: you
> would need double() for that.

Subject: Matlab runtime error!

From: Walter Roberson

Date: 29 Sep, 2010 17:42:44

Message: 6 of 7

On 10-09-29 12:32 PM, Ender wrote:
> Numerical Solver??
>
> Such as Newton's Method?
>
> Does MATLAB have any built in solvers that I can use?

fzero()

Subject: Matlab runtime error!

From: Steven_Lord

Date: 29 Sep, 2010 17:50:08

Message: 7 of 7



"Ender " <jr147@msstate.edu> wrote in message
news:i7vt7m$ri5$1@fred.mathworks.com...
> Numerical Solver??
>
> Such as Newton's Method?
>
> Does MATLAB have any built in solvers that I can use?

Since you have one equation in one unknown, use FZERO.

*snip Walter's answer*

--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Tags for this Thread

No tags are associated with 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