Skip to main content
1-Visitor
March 15, 2018
Question

Out of memory

  • March 15, 2018
  • 3 replies
  • 8378 views

Dear all,

 

I'm using Mathcad 15 M030 for analysing data. I got the "out of memory" error message if I paste the file I have attached in a mathcad table.

I know that the topic has been already discussed in this forum but I didn't find any workaround.

Is there in the meantime a new solution?

Thank-you very much for your support.

 

Regards

3 replies

21-Topaz II
March 15, 2018

Hi,

All data must be on the right. Something is wrong with the central column (B).

total sum.jpg

ebelmonte1-VisitorAuthor
1-Visitor
March 15, 2018

Hello,

 

Thank-you for your reply.

It is better now but I still have out of memory error message if the table is bigger (73000 x 3).

Is there any way to work with "big" data without this problem?

24-Ruby III
March 15, 2018

Please provide your Mathcad worksheet in archive.

25-Diamond I
March 15, 2018

One method would be to read in the data using one of Mathcads READ.... functions.

But as you are using real Mathcad and not crappy Prime,  you can copy the data from your text file (Ctrl-C), go to Menu - Insert - Data - Table, highlight the first three columns in the first row of the data table which was just created and insert the copied data (Ctrl-V).

It should work without highlighting the top three cells but it doesn't for me.

I attach a worksheet with the inserted data.

 

> I still have out of memory error message if the table is bigger (73000 x 3).

> Is there any way to work with "big" data without this problem?

Thats not really "big" data for Mathcad and sure should work OK. You may consider not to copy the data but rather read it in from your text file in case the data changes now and there.

 

Unbenannt.PNG

@Francesco:

> All data must be on the right. Something is wrong with the central column (B).

No, nothing wrong with the data. Its just your European installation of Excel which expects a comma as decimal separator rather than the decimal point provided in the text file. So the data 0.17 is interpreted as text by your Excel and not as a number and so it not right-, but left-justified.

 

25-Diamond I
March 15, 2018

In case you are unsure as to how to read in the data - with the data format you provided you can simply use READPRN to do so:

 

Bild2.PNG

ebelmonte1-VisitorAuthor
1-Visitor
March 15, 2018

Dear Werner,

 

It works, thanks a lot.

Mathcad is still consuming much memory 1.5Gb but I get no error message anymore.

19-Tanzanite
March 17, 2018

Without seeing your Mathcad worksheet I have to guess. But, as you say, this has come up before, many times, so it's an educated guess.

 

How can such a small amount of data lead to such huge memory requirements? The answer is probably that you are creating many copies of the data in the worksheet. Take this simple example, where A is your data:

 

B:=A*2

C:=sin(B)

D:=log(C)

 

B, C, and D are all copies of your data, and all are stored internally, because Mathcad has to be able to display them at any time. You might think that overwriting A is a solution:

 

A:=A*2

A:=sin(A)

A:=log(A)

 

It's not. Each new A is still held internally in memory. The second A can't overwrite the first A because Mathcad has to be able to display both, depending on where in the worksheet you put an evaluation.

 

Creating a long series of static calculations is a bad way of doing things in Mathcad. There are many reasons why that is true, and this is one of them (especially when it comes to data analysis).

 

Instead, define a function:

f(A):=log(sin(A*2)

 

This takes negligible memory, and has the advantage of being reusable throughout the worksheet.

 

Then you can do

 

B:=F(A).

 

All the intermediate results, which you likely didn't need to look at anyway, are gone, along with the memory required to store them.