フィルターのクリア

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 Center および File ExchangeSpectral Measurements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by