Pearson correlation graph between variables
Show older comments
Hi
There are 6 variables (10,000 of each) which I am importing from excel and then using these, I am calculating a new variable let us say, Y (again, 10,000 iterations). How do I plot Pearson correlelation coeffcient between Y and each of 6 variables as tornado plots?
Thanks in advance
Accepted Answer
More Answers (1)
clc; clear ;
R = zeros(6,1) ;
for i = 1:6
X = rand(100,1) ;
y = rand(100,1) ;
R(i) = regression(X',y') ;
end
barh(R)
Categories
Find more on Discrete Data Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!