필터 지우기
필터 지우기

About running matlab in linux.

조회 수: 9 (최근 30일)
C Zeng
C Zeng 2012년 6월 26일
Hello, I run the same program in Windows it shows Out of memory. Type HELP MEMORY for your options. Then I run it in Linux, it runs for a while and then shows killed.
does it mean it is out of memory or something else? How to resolve it? Thanks.

채택된 답변

tlawren
tlawren 2012년 6월 26일
If you run some code on Windows and get an "Out of memory" error and then run the same code on Linux (on the same hardware) and Matlab just crashes, then yes, it might mean that you are out of memory in Linux too. Can you provide more details? What does your code do?
If you are in fact running out of memory, then the most obvious solution is to get more memory (if you can). Beyond that, you will have to re-write your code to work under your memory constraints. For instance, if you have big data matrices just sitting around doing nothing, then clear them away to make room for things you will use. If you make use of a lot of intermediate variables, try overwriting only a few variables instead.
  댓글 수: 8
Walter Roberson
Walter Roberson 2012년 6월 26일
When you use the class type parameter to zeros() or ones() it never allocates the array as double precision, so it is better especially when you use large arrays.
C Zeng
C Zeng 2012년 6월 27일
Thank you!

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

추가 답변 (1개)

C Zeng
C Zeng 2012년 6월 26일
Also I find the answer to convert a matrix to single precision, that is 'single'. But I tried this command, but it still gives a double precision.
For example, a=ones(2,3,'single'); 1.5*a shows a double matrix. Could anyone explain it? Thanks.
  댓글 수: 7
C Zeng
C Zeng 2012년 6월 28일
Seems not so, it shows Conversion to uint8 from cell is not possible.
Walter Roberson
Walter Roberson 2012년 6월 28일
cell arrays have potentially data types per entry, not per dimension.
num2cell() converts numeric arrays into cell arrays.

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

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by