For standard eigenproblem EIG(A), A must be square
5 次查看(过去 30 天)
显示 更早的评论
for the following code I get an error "For standard eigenproblem EIG(A), A must be square", what can be the reason?
Shh = imread('SLC_HH.tif'); Shv = imread('SLC_HV.tif'); Svh = imread('SLC_VH.tif'); Svv = imread('SLC_VV.tif'); S = [Shh,Shv;Svh,Svv];
A= -9999*ones(11660,6033); for i= 1:1000 for j= 1:600
%Coherency matrix T11 = (abs(Shh+Svv)).^2; T12 = (Shh+Svv).* conj(Shh-Svv); T13 = (Shh+Svv).* conj(Shv); T21 = (Shh-Svv).* conj(Shh+Svv); T22 = (abs(Shh-Svv)).^2; T23 = (Shh-Svv).* conj(Shv); T31 = 2*Shv.*conj(Shh+Svv); T32 = 2*Shv.*conj(Shh-Svv); T33 = (abs(Shv)).^2; T = 0.5 * [T11, T12, T13; T21, T22, T23; T31, T32, T33];
%Eigen value decomposition [V,D] = eig(T) ;
0 个评论
回答(3 个)
Youssef Khmou
2014-9-2
For a non square matrix, you need either to compute the covariance T*T' or you can adjust the dimensions , try the following procedure :
M=size(T);
n=min(M);
TT=T(1:n,1:n);
[V,D]=eig(TT);
0 个评论
Julia
2014-9-2
Hi,
Are your images greyscale or truecolor images?
From the Matlab help:
A = imread(filename, fmt)
If the file contains a grayscale image, A is an M-by-N array. If the file contains a truecolor image, A is an M-by-N-by-3 array. For TIFF files containing color images that use the CMYK color space, A is an M-by-N-by-4 array.
Perhaps your matrices Shh, Shv, Svh and Sw are not 2-dimensional and this causes the error for T?
Hana
2014-9-2
1 个评论
Pierre Benoit
2014-9-2
Please comment instead of answering if it's not actually an answer.
It appears that your matrice T is not square, have you checked the dimensions of your images and your variables Tij ?
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Computer Vision with Simulink 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!