Matrix Indexing and manipulations

조회 수: 4 (최근 30일)
Abel Francis
Abel Francis 2020년 6월 14일
편집: Abel Francis 2020년 9월 13일
I have 4 points with point ID A, B, C & D which is a 4 by 3 matrix (A_matrix), I want to manipulate it such that the resultant B_matrix is 6 by 6 matrix. Note, the B-matrix most follow the definition of point ID " From To " to enable further applications. Can somebody assist me, please.
A_Matrix
x y z
A 593898.8877 -4856214.546 4078710.706
B 594576.9223 -4855007.836 4080036.446
C 593997.0267 -4854862.499 4080291.279
D 593319.2704 -4855416.031 4079738.306
B_Matrix
From To X Y Z X Y Z
A B 593898.8877 -4856214.546 4078711 594576.9 -4855008 4080036
B C 594576.9223 -4855007.836 4080036 593997 -4854862 4080291
A C 593898.8877 -4856214.546 4078711 593997 -4854862 4080291
D C 593319.2704 -4855416.031 4079738 593997 -4854862 4080291
A C 593898.8877 -4856214.546 4078711 593997 -4854862 4080291
B D 594576.9223 -4855007.836 4080036 593319.3 -4855416 4079738

채택된 답변

Matt J
Matt J 2020년 6월 15일
[A_matrix([1 2 1 4 1 2],:) , A_matrix([2 3 3 3 3 4],:)]
  댓글 수: 7
Matt J
Matt J 2020년 6월 17일
You're quite welcome.
Abel Francis
Abel Francis 2020년 9월 13일
편집: Abel Francis 2020년 9월 13일
Hello Master Matt. I was able to solved the problem I posted some Months ago. The implementation and data format is as shown below. Kindly verify if it is correct. I have attached the function file, gpsblvec.m.
% ECEF GPS COORDINATE GEODETIC EQUIVALENT % STN x y z lon lat h % A 593898.8877 -4856214.546 4078710.706 9 14 16 12 45 17 227.216 % B 594576.9223 -4855007.836 4080036.446 9 52 00 12 40 12 225.375 % C 593997.0267 -4854862.499 4080291.279 9 44 18 12 15 47 224.833 % D 593319.2704 -4855416.031 4079738.306 9 11 26 12 44 10 226.99 % A B % B C % A C % D C % A C % B D
x=[593898.8877;594576.9223;593997.0267;593319.2704];
y=[-4856214.546;-4855007.836;-4854862.499;-4855416.031];
z=[4078710.706;4080036.446;4080291.279;4079738.306];
fromto={'A' 'B';'B' 'C';'A' 'C';'D' 'C';'A' 'C';'B' 'D'}; m=4;
[dX,dY,dZ] =gpsblvec(fromto,x,y,z,m)

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Abel Francis
Abel Francis 2020년 9월 13일
편집: Abel Francis 2020년 9월 13일
Attached is the file Master Matt.

카테고리

Help CenterFile Exchange에서 Number Theory에 대해 자세히 알아보기

제품


릴리스

R2013a

Community Treasure Hunt

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

Start Hunting!

Translated by