I have a new laptop with a high end (GeForce GTX 770M) discrete GPU, but when I plot large amounts of data (50k+ points), it still seems quite slow and sluggish. Is Matlab using the GPU to render the graphics? If not, is there a way I can make it use the discrete GPU instead of the onboard CPU graphics?


It will not automatically use the GPU to do normal plots.

However, if you have the parallel computing toolbox and work with a gpuarray, then it will in fact automatically use the GPU to make your plot.

Described in this Mathworks newsletter: GPU programming in MATLAB.

GPU Computing in MATLAB

Before continuing with the wave equation example, let's quickly review how MATLAB works with the GPU.

FFT, IFFT, and linear algebraic operations are among more than 100 built-in MATLAB functions that can be executed directly on the GPU by providing an input argument of the type GPUArray, a special array type provided by Parallel Computing Toolbox. These GPU-enabled functions are overloaded—in other words, they operate differently depending on the data type of the arguments passed to them.


Check this guide:

MATLAB GPU Computing Support for NVIDIA CUDA-Enabled GPUs


It explains what you want to know.

Perform MATLAB Computations on CUDA GPUs

Using MATLAB for GPU computing lets you accelerate your applications with GPUs more easily than by using C or Fortran. With the familiar MATLAB language you can take advantage of the CUDA GPU computing technology without having to learn the intricacies of GPU architectures or low-level GPU computing libraries.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.