User Tools

Site Tools


public:matlab_tips

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
public:matlab_tips [2016/04/02 06:41] – [Prod vs repeated multiplication] fangfufupublic:matlab_tips [2018/03/31 00:38] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== Matlab Tips ======
 +===== General tips =====
 +  - If you plan to use parallel for-loop, put the parfor statement in the outermost loop to reduce inter-process communication.
 +===== Simple text progress bar =====
 +<code matlab>
 +disp('     ');
 +for i = 1:x
 +    fprintf('\b\b\b\b\b\b%05.2f%%', i/x*100);
 +    %%%%% Do your biddings here %%%%%
 +end
 +disp(' ');
 +</code>
 +
 +===== GPU / Host Performance =====
 +These results were obtained using [[https://uk.mathworks.com/matlabcentral/fileexchange/34080-gpubench|GPUBench]].
 +^ ^Results for data-type 'double' (In GFLOPS) ^^^Results for data-type 'single'(In GFLOPS)^^^
 +^Device                       ^MTimes ^Backslash^FFT          ^MTimes  ^Backslash ^FFT   |
 +^TITAN Xp                         |422.47 |371.37   |207.24 |11607.69|1426.76   |763.56|      
 +^GeForce GTX 1080                 |280.84 |223.05   |137.66 |7707.01 |399.37    |424.60|      
 +^Core i7-4900MQ (Single Thread)         |123.00 |86.57   |8.47         |272.00 |180.32    |14.31 |
 +^GeForce GT 730M                 |27.43 |25.43   |10.54 |346.57 |214.98    |27.09 |
  
public/matlab_tips.txt · Last modified: 2018/03/31 00:38 by 127.0.0.1