How to rotate the field vectors in the minimum covariance direction?
3 ビュー (過去 30 日間)
古いコメントを表示
I have a magnetic field data (n by 3 components) and i wish to find its covariance matrix and obtain eigen values, eigen vectors.
Now how to rotate this magnetic field vectors in the minimum covariance direction?
I attempted the following steps to obtain eigen values and eigen vectors:
Bxyz is nX3 matrix.
covx = cov(Bxyz(:,:));
[ei_vec,ei_val,explained] = pcacov(covx);
[min_eival id_min_eival] = min(ei_val);
MVDir = ei_vec(id_min_eival,:);
0 件のコメント
回答 (1 件)
Shashank Gupta
2020 年 10 月 22 日
Hi Megha,
I am assuming the minimum covariance direction here means the direction in which the spread(variance) of data is least. I am not really sure why do you want to rotate, may be you want to project the data in that direction (that would make sense), not the rotatation as such. For now let's just assume you want to project the magentic field data in the min covariance direction, You already found the least eigen value and the corresponding eigen vector, Now you simple need to project that data, you can do so,
BxyzTransformed = MVDir'*Bxyz
And even you can find the transformed covariance matrix by,
covxTransformed = MVDir'*covx*MVDir
I hope, I understood your question properly or atleast the intention.
Cheers
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Cartesian Coordinate System Conversion についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!