imagesc Vs pcolor Vs contourf for large arrays?

조회 수: 35 (최근 30일)
HC98
HC98 2024년 3월 24일
편집: Benjamin Kraus 2024년 3월 25일
I have an array that’s 32000x1001 and want to plot it using one of the listed functions. As you’d expect they all take a very long time and are very slow. my question is 2 parts: firstly how to speed them up? And second which works best?
  댓글 수: 3
Mathieu NOE
Mathieu NOE 2024년 3월 25일
considering the resolution of your screen, which is way below the amount of data you want to display , what about doing some downsampling of the 32000 rows ?
Adam Danz
Adam Danz 2024년 3월 25일
An alternative along the lines of what Mathiew Noe is recommending, you could try using histogram2 or binscatter. But as others have mentioned, the ratio of your data may result in some charts that are difficult to read.

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

답변 (1개)

Benjamin Kraus
Benjamin Kraus 2024년 3월 25일
편집: Benjamin Kraus 2024년 3월 25일
My recommendation would be to use imresize to reduce the number of rows/columns in your array before you plot it.
Whether you use imresize or not, as other have mentioned, because your screen doesn't have 32,000 pixels horizontally or vertically, the picture you see on the screen will have to be downsampled somehow. If you use imresize you control the method used for the downsampling, and you have a large range of options. This will likely be faster than relying on the imagesc command to do the downsampling, and imagesc offers only two choices for how to do the downsample (rather than the 8 or so options offered by imresize).

카테고리

Help CenterFile Exchange에서 Lighting, Transparency, and Shading에 대해 자세히 알아보기

제품


릴리스

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by