필터 지우기
필터 지우기

how to show P-values in correlation map?

조회 수: 20 (최근 30일)
Vedanta
Vedanta 2024년 2월 13일
댓글: Hassaan 2024년 2월 13일
Hello,
I have generated two maps by using corrcoef function, one is correlation map and second one is pvalue map. Now, I want to highlight (with dots) those pixels in correlation map which is having pvalue value less than 0.05. I have tried with stipples function but it is show some error. Is there any other way?
Thanks

채택된 답변

Hassaan
Hassaan 2024년 2월 13일
% Example data for demonstration
% Replace these with your actual corrMap and pValueMap variables
corrMap = rand(100); % 100x100 matrix of correlation values
pValueMap = rand(100); % 100x100 matrix of p-values
% Display the correlation map
imagesc(corrMap);
colormap('jet'); % Use a colormap of your choice
colorbar;
title('Correlation Map with Significant P-values Highlighted');
xlabel('X-axis Label');
ylabel('Y-axis Label');
% Hold on to overlay the dots
hold on;
% Get the indices where p-value is less than 0.05
[rows, cols] = find(pValueMap < 0.05);
% Overlay dots at these positions
% 'wo' stands for white circle, change the color/marker as needed
plot(cols, rows, 'wo', 'MarkerSize', 4);
% Hold off if you're done plotting
hold off;
-----------------------------------------------------------------------------------------------------------------------------------------------------
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.
  댓글 수: 2
Vedanta
Vedanta 2024년 2월 13일
wow this works like charm, thanks @Hassaan
Hassaan
Hassaan 2024년 2월 13일
@Vedanta You are welcome.
-----------------------------------------------------------------------------------------------------------------------------------------------------
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.

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by