Skip to main content
4-Participant
April 6, 2017
Solved

Problem in AdamsBDF, getting error as not enough memory for this operation

  • April 6, 2017
  • 3 replies
  • 3980 views

Hi all,

I have some problem in computing ODE in AdamsBDF.

I want to use AdamsBDF function as below,

S = AdamsBDF(initial, 0, 10^6, 10^10, D)

But, when I try to use 'S' as above, I am getting an error as not enough memory for this operation.

Is there any other way to increase the sampling interval.


I attached my code below.

Best answer by Werner_E

> I need to plot for different initial conditions like, 0.2,0.3...1 in the same single plot.

THIS should be no problem with decent sized (just a few millions) vectors.

I don't think you can create a vector that big as 10^10 elements and even if this would be possible (Prime should not face those memory limits), Mathcad probably would refuse to plot that many points.

3 replies

25-Diamond I
April 6, 2017

The problem is not the sampling interval up to 10^6 but the number of steps you demand.

See no simple way to get a precision of 10^10 time steps. Even if AdamBDF would be capable to do so, you would get the "can't plot tham many points" error when trying to plot.

Do you really need result vectors with 10^10 elements??

vveeran4-ParticipantAuthor
4-Participant
April 6, 2017

Dear Werner Exinger,

Thanks for your reply.

Yes, I need vectors with 10^10 elements and I need to plot those vectors.


I need to plot for different initial conditions like, 0.2,0.3...1 in the same single plot.

If I add some more parameters to D(t,x), and in the sampling interval if I type 10^10

S = AdamsBDF(initial, 0, 10^6, 10^10, D)

If I try to plot for S, then the mathcad shows the error as not enough memory for this operation.

Is it possible to do AdamsBDF with more vector elements more than 10^10.

Werner_E25-Diamond IAnswer
25-Diamond I
April 6, 2017

> I need to plot for different initial conditions like, 0.2,0.3...1 in the same single plot.

THIS should be no problem with decent sized (just a few millions) vectors.

I don't think you can create a vector that big as 10^10 elements and even if this would be possible (Prime should not face those memory limits), Mathcad probably would refuse to plot that many points.

vveeran4-ParticipantAuthor
4-Participant
April 6, 2017

Dear all,

Thank you very for your replies.

I will try to follow your suggestions.

24-Ruby III
April 6, 2017

vetri veeran wrote:

... I am getting an error as not enough memory for this operation....

Interestingly, in what Mathcad service release there is such an error? In Mathcad 15 F000 and M045 I have an error "This value must be a positive integer". And how others? Can anyone test the solution in Mathcad Prime 4.0 version?

25-Diamond I
April 6, 2017

Strange.

This is what I get in Mathcad 15.0 (M045 [MC15_M045_20151202])

24-Ruby III
April 6, 2017

I set 10^10.