- Technical Services and Consulting
- Embedded Systems | Firmware Developement | Simulations
- Electrical and Electronics Engineering
how to show P-values in correlation map?
25 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
采纳的回答
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
Feel free to contact me.
2 个评论
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 Exchange 中查找有关 Mapping Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!