If you have an Nvidia Graphic Card, you must install nvidia drivers to get the best performance.
To save an array to your GPU memory, just save it with gpuArray and to return it to your Ram use gather.

A simple CPU example is the following:

function [time]= cpu(n)A = rand(n,n);tic;B = fft(A);time = toc;

If we want use the GPU, just add the bold lines:

function [time]= gpu(n)A = rand(n,n);% send A to the GPUA = gpuArray(A);tic;B = fft(A);time = toc% return B to the CPUB = gather(B)
To know how many bytes will need your CPU to storage a gpuArray, before gather it, you can use this equation:

numel(B) * 8 for double-precision arrays
ornumel(B) * 16 if the array is complex
To checkout the variable size, use the command: whos

If you choise a large value for n, probably you will see the following message:Out of memory on device. To view more detail about available memory on the GPU, use 'gpuDevice()'. If the problem persists,reset the GPU by calling 'gpuDevice(1)'.

If you have an external monitor like a DELL 24" IPS P2414H, one problem is that it doesn't recognize when it rotates.
I developed on bash an application to rotate the monitor.
You need identificate the name and resolution of your monitor. Just run:

The previous error is because we need configurate all options, like if you are agree with the license agreement, enter the licence key, etc.
To do this, you need to edit installer_input.txt and activate.ini files: