NaN output only when using three ouput for QR
I’m trying to use the canoncorr function. I removed all features with NaN values from my two input matrices. Still, I get the error
Error using canoncorr (line 86)
X must contain at least one non-constant column.
This is because the function qr in
[Q1,T11,perm1] = qr(X,0);
returns all-NaN Q1 and T11, therefore at the next line rankX is 0.
Nonetheless, I noted that if I run only [Q1,T11] = qr(X,0); or [T11] = qr(X,0); all looks ok.
Any guess on what is going on?
Thank youI’m trying to use the canoncorr function. I removed all features with NaN values from my two input matrices. Still, I get the error
Error using canoncorr (line 86)
X must contain at least one non-constant column.
This is because the function qr in
[Q1,T11,perm1] = qr(X,0);
returns all-NaN Q1 and T11, therefore at the next line rankX is 0.
Nonetheless, I noted that if I run only [Q1,T11] = qr(X,0); or [T11] = qr(X,0); all looks ok.
Any guess on what is going on?
Thank you I’m trying to use the canoncorr function. I removed all features with NaN values from my two input matrices. Still, I get the error
Error using canoncorr (line 86)
X must contain at least one non-constant column.
This is because the function qr in
[Q1,T11,perm1] = qr(X,0);
returns all-NaN Q1 and T11, therefore at the next line rankX is 0.
Nonetheless, I noted that if I run only [Q1,T11] = qr(X,0); or [T11] = qr(X,0); all looks ok.
Any guess on what is going on?
Thank you qr, matlab, canoncorr MATLAB Answers — New Questions