how to create matrix based on column conditions
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Poulomi Ganguli
am 22 Aug. 2018
Kommentiert: Poulomi Ganguli
am 22 Aug. 2018
Hello I have two different matrices A and B as below:
A=
9 16 1966 65.3
9 16 1967 73
9 16 1968 78.9
12 23 1966 61
12 23 1967 63.2
12 23 1968 51.8
12 28 1966 0
12 28 1967 0
12 28 1968 0
12 29 1966 0
12 29 1967 0
12 29 1968 0
B =
1 16 919.3254136
1 23 3979.074644
1 28 3582.388628
1 29 8401.61424
I need to create a third matrix C, which will take the value from Matrix A and fill the corresponding value at Matrix B in the form of time series/ the combination of both matrices
C =
1 16 919.3254136 1966 65.3
1 23 3979.074644 1966 61
1 28 3582.388628 1966 0
1 29 8401.61424 1966 0
1 16 919.3254136 1967 73
1 23 3979.074644 1967 63.2
1 28 3582.388628 1967 0
1 29 8401.61424 1967 0
1 16 919.3254136 1968 78.9
1 23 3979.074644 1968 51.8
1 28 3582.388628 1968 0
1 29 3582.388628 1968 0
I am trying with ismember but could not able to make it. Any help?
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Resizing and Reshaping Matrices 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!