필터 지우기
필터 지우기

How to speed up pcolor and waterfall for large arrays?

조회 수: 7 (최근 30일)
HC98
HC98 2024년 3월 16일
댓글: HC98 2024년 3월 16일
I have an array of size 32000x1000 and when I run the pcolor or waterfall function (I’ve also tried contour) it takes AGES. like upwards of 2-3 minutes to plot then save the graphic. is there a way I can downscale or something to speed it up?

답변 (1개)

Hassaan
Hassaan 2024년 3월 16일
Initial concept:
originalData = rand(32000, 1000); % Example large dataset
factor = 10; % Downsampling factor
% Downsampling
downsampledData = originalData(1:factor:end, 1:factor:end);
% Now plot using pcolor (or any other plotting function)
figure;
pcolor(downsampledData);
shading interp; % Makes the plot smoother by interpolating between points
colorbar; % Adds a color bar to indicate the scale
-----------------------------------------------------------------------------------------------------------------------------------------------------
If you find the solution helpful and it resolves your issue, it would be greatly appreciated if you could accept the answer. Also, leaving an upvote and a comment are also wonderful ways to provide feedback.
It's important to note that the advice and code are based on limited information and meant for educational purposes. Users should verify and adapt the code to their specific needs, ensuring compatibility and adherence to ethical standards.
Professional Interests
  • Technical Services and Consulting
  • Embedded Systems | Firmware Developement | Simulations
  • Electrical and Electronics Engineering
Feel free to contact me.
  댓글 수: 1
HC98
HC98 2024년 3월 16일
Thanks but did you do this in GPT?
> It's important to note that the advice and code are based on limited information and meant for educational purposes. Users should verify and adapt the code to their specific needs, ensuring compatibility and adherence to ethical standards.

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

카테고리

Help CenterFile Exchange에서 Blue에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by