Use of Correlation function( corr)
古いコメントを表示
I am new to MATLAB.
I need to test correlation function on a data set in the form of a table(1x9757). When i input this into the correlation function, a new matrix if formes with size 9757x9757. But all the values in it are 'NaN' and in the workspace (where the size and minimum and maximum values of variables is mentioned), in the column of minimum and maximum value a message comes that says, 'Too many elements'.
Could anyone please help me with this. I am stuck on this from a very long time.
Thanks!
1 件のコメント
回答 (1 件)
Hi Abhivyakti,
I know the question is past old however for any one wondering Jose is right. It should come to one
data = rand(1, 9757);
dataTable = array2table(data);
disp(dataTable(:, 1:5));
correlationMatrix = corr(dataTable{1, :}', dataTable{1, :}');
disp('Correlation coefficient:');
disp(correlationMatrix);
カテゴリ
ヘルプ センター および File Exchange で Correlation and Convolution についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!