I am trying to plot a surface plot from a 10000x10000 matrix, however i am running into difficulties as far as performance is concerned.
Running on t6500 2.1 dual core cpu (core 2 duo) ,4gb of ram and 4gb of swap. gpu-4570 amd. running on 64 bit linux.
For testing purposes i created a random matrix and attempted to plot it as a surface plot:
R = sprand(10000,10000,0.3);
surf(R )
However i very quickly (matter of seconds) ran out of memory, after about 2 minutes ram usage was 98%, swap 100% and still no plot... Reducing to 1000x1000 matrix plots in about 3 seconds.
Is this due to my system being too slow or is it something i am doing wrong?
Thanks

 採用された回答

per isakson
per isakson 2013 年 3 月 24 日
編集済み: per isakson 2013 年 3 月 27 日

0 投票

With R2012a,64bit,Win7,8GB
R = sprand( 1000, 1000, 0.3 );
surf( R )
crashes my Matlab. Are you sure surf is supposed to take a sparse matrix?
.
[Added 2013-03-27]
I repeated the experiment with the three different Renderers. First a copy from the "command history"
%-- 2013-03-27 11:12 --%
set(gcf,'renderer','zbuffer')
R = sprand( 1000, 1000, 0.3 );
surf( R )
set(gcf,'renderer','opengl')
surf( R )
%-- 2013-03-27 11:25 --%
set(gcf,'renderer','painters')
R = sprand( 1000, 1000, 0.3 );
surf( R )
%-- 2013-03-27 11:35 --%
  • with zbuffer surf( R ) worked fine
  • with opengl Matlab crashed directly
  • with painters surf( R ) had not displayed any result after some minutes. Cntrl+C made Matlab quit.
Restart of Matlab. Which Renderer is default?
>> get( gcf, 'renderer' )
ans =
None
>> get( gcf, 'renderermode' )
ans =
auto
>> opengl info
Version = 3.2.0
Vendor = NVIDIA Corporation
Renderer = Quadro NVS 420/PCI/SSE2
...

7 件のコメント

Anton
Anton 2013 年 3 月 24 日
Not sure whether it is supposed to or not (only used it since i didnt think of using A=rand(1000,1000); at the time
Just tried again,- no my matlab did not crash with
EDU>> R = sprand( 1000, 1000, 0.3 ); EDU>> surf(R )
Anton
Anton 2013 年 3 月 24 日
Just tried again with
Q=rand(10000,10000); surf(Q)
experiencing the same issues (full swap and ram cpu@100%, yet no graph and matlab doesnt crash(although entire computer lags, bu that is expected with full ram and swap)). reducing back to 1000 works fine.
Jan
Jan 2013 年 3 月 25 日
Which renderer do you use? OpenGL is usually more efficient for such large data, but depending on the driver, the opposite could be true.
Anton
Anton 2013 年 3 月 26 日
Yep i am using opengl.
per isakson
per isakson 2013 年 3 月 27 日
I get the best performance with zbuffer. See my answer.
Anton
Anton 2013 年 3 月 27 日
Thanks, sorted now.
per isakson
per isakson 2013 年 3 月 27 日
Why not tell us how you solved the problem?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Graphics Performance についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by