[MATLAB](adsbygoogle = window.adsbygoogle || []).push({});

The cod is:

function RunLogOscilNumeric3

k =10;

p0 =0.001;

t = [0:0.01:10000 ];

omega = 1;

N0 = 1;

options =[ 'AbsTol',1e-3,'RelTol',1e-6]

% options =odeset( 'RelTol',1e-6 ,'stats','on');

[t,p]=ode45(@logOscilnumeric3,t,p0,options,omega,k,N0);

Pmax = max(p)

Pmean = mean(p)

figure(1)

plot(t,p)

1;

% function dpdt = logOscilnumeric3(t,p,omega,k,N0)

% dpdt = N0.*p - (N0.*sin(omega.*t).*p.^2/k);

% end

The error is :

Warning: Failure at t=1.058553e+01. Unable to meet integration tolerances

without reducing the step size below the smallest value allowed

(2.842171e-14) at time t.

> In ode113 at 425

In RunLogOscilNumeric3 at 11

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# [MATLAB] I am getting this error, could anyone solve it please? r

Loading...

Similar Threads - MATLAB getting error | Date |
---|---|

I don't get a reasonable output for my code? | Mar 18, 2017 |

How long does it take to get good at matlab? | Apr 24, 2015 |

How to get specific frequency and time values for .wav file | Mar 3, 2015 |

Matlab basic - how to get around floating point? | Aug 30, 2014 |

[MATLAB] - Getting Error | Mar 24, 2010 |

**Physics Forums - The Fusion of Science and Community**