1

I tried lingo software. More than 100 hours passed, I haven't get the result.

I tried MATLAB software. When I run this code "A=zeros (1187550,391275)" it occurs error: The biggest variable values beyond the program allows

So, is there some good ways to solve this large-scale matrix model?

double-beep
  • 5,031
  • 17
  • 33
  • 41
杜昱萱
  • 23
  • 5

1 Answers1

0

You gave it a multiplication. So it gets the result and tries to create a square matrix with as much rows and columns as the result.

what you want is

A=zeros(1187550,391275)

Next time try help $command$ to get an explanation for the function in matlab

or doc $command for the documentation

edit:

You also need 3.5TB of RAM for that as

1187550*391275*64bit/8(bit per byte)/1024(byte per kB)/1024(kB per MB)/1024(MB per GB) = 3462GB.

I guess you dont have that much^^

So you should break it down to partial solutions if possible. And if it suits you, you can also use another datatype to reduce the needed memory (single/float would cut it in half).

This problem should be present in any other program as long it allocates the memory for the whole Matrix at once.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Kami Kaze
  • 2,069
  • 15
  • 27
  • Yeah, The code is "A=zeros(1187550,391275)". I'm sorry for my writing error. It always occur the error "Maximum variable size allowed by the program is exceeded" – 杜昱萱 Sep 01 '16 at 12:04
  • next thing is you need approx 3.5TB of ram for that as 1187550*391275*64bit/8 (bit per byte)/1024(to kB)/1024(to MB)/1024(to GB) is 3462GB. So you should do partial solutions if possible. – Kami Kaze Sep 01 '16 at 12:17
  • yes, it is a so large scale matrix, it is thorny. Thanks for you answer and help. I may simplify my model first – 杜昱萱 Sep 04 '16 at 07:12
  • If you like the answer you may upvote it and or mark it as the solution – Kami Kaze Sep 06 '16 at 06:23