フィルターのクリア

How can I use Canoncorr correctly? I have an Error!

3 ビュー (過去 30 日間)
Francesca Horne
Francesca Horne 2020 年 5 月 12 日
回答済み: Harsha Priya Daggubati 2020 年 5 月 15 日
Canonical Data
% Load the Data
load ('cancorfile_assignment (1).mat');
%Define the data
data = [amyv antc cerebel vents thalam dlpfc openn consc extrav agree neurot]; %My data is brain structures and personality types
NaNs = sum(isnan(data),2) > 0;
X = data(~NaNs,1:6);
Y = data(~NaNs,7:11);
[A,B,r,U,V,stats] = canoncorr (X,Y)
I have entered this? but I get the error: Error using canoncorr (line 74)
X and Y must have more than one row.?
How do I fix this issue?

回答 (1 件)

Harsha Priya Daggubati
Harsha Priya Daggubati 2020 年 5 月 15 日
Hi,
The inpur arguments X and Y to the method 'canoncorr' should be a n X d matrix, where n is the number of observations and d is for number of variables.
And yes, It is expected for X and Y to have more than one row to perform canonical correlation analysis on the data.
Hope you modify the data as per the requirements and conduct your analysis.

カテゴリ

Help Center および File ExchangeANOVA についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by