Newbie: How can I operate with huge data in variables at the workspace?

조회 수: 1 (최근 30일)
Sergio
Sergio 2013년 6월 25일
Hi,
In a test, I have gathered like 200MB of data splited in like 8 variables. I have an array of data for voltage (3000000x1 double) and another for current. I would like to plot the resistance, and I tried in the Command Window:
Resistance= Voltage/Current (as those are the names of the variables)
I get this error:
???Error using==> mldivide Out of memory. Type HELP MEMORY for your options.
This is a very small test compared with another and I really hope it is not because the PC has not RAM to do it!!
Many thanks
Sergio.
  댓글 수: 1
Muthu Annamalai
Muthu Annamalai 2013년 6월 25일
편집: Muthu Annamalai 2013년 6월 25일
You probably want to do this instead,
Resistance= Voltage./Current; %don't for semi-colon b/c of your data size!
to obtain the element-wise division. Reading the MATLAB tutorial is an excellent way to get started!

댓글을 달려면 로그인하십시오.

답변 (2개)

Image Analyst
Image Analyst 2013년 6월 25일
Did you type help memory like it suggested? Or check here: http://www.mathworks.com/support/tech-notes/1100/1107.html. Can you use single variables instead of double? Can you add RAM memory?
  댓글 수: 2
Sergio
Sergio 2013년 6월 25일
I think it is not downt to lack of memory. I could do an operation of Res=Voltage./Current
So it is something related with HOW TO DIVIDE ARRAYS with the form of 1234x1(What I suppose is one column)
Image Analyst
Image Analyst 2013년 6월 25일
Use ./ instead of / to do an element by element division. A single, plain slash means a matrix divide so it has to calculate the inverse. You're essentially doing a least squares regression calculation, which is not what you want to do.

댓글을 달려면 로그인하십시오.


Sergio
Sergio 2013년 6월 25일
Hi, I typed it but I am quite new here and hoped it was something I was doing wrong instead of the lack of memory of the PC. Do you know how to convert DBL to single? Is it easy? Maybe we should have recorded the data of the resistance in LabVIEW as it is very heavy to manipulate it in a PC afterwards?
Thank you for your answer!!

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by