How to organize an array (x_i,y_j,z) such that (x_i,y_i)=z?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Md. Hasan Rahman
am 1 Aug. 2021
Kommentiert: Md. Hasan Rahman
am 1 Aug. 2021
I have a matrix such that:
A=[1 1 2; 1 2 0.5; 2 1 0.5; 2 2 1];
I would like to organize the last coloumn of array A such that,
B=[2 0.5; 0.5 1];
As we can see B(1,1)=2; B(1,2)=0.5; B(2,1)=0.5; B(2,2)=1.
The coordinate B(x,y) come from the from x corresponds to A(:,1) and y corresponds to A(:,2). Can anyone suggest me how should I approach? Thank you.
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!