Extracting particular column

12 次查看(过去 30 天)
Pat
Pat 2011-11-9
I have 2 matrix
A=[1 .5 .3 .6 98
2 .6 .3 .5 89
3 .5 .6 91
;
5 3 .6 87
;100 .8 .01 87]
B=[1.0000 5.0000 1.0000 0 92.5322
1.0000 6.0000 1.0000 0 94.9162
1.0000 2.0000 1.0000 0 93.9432
1.0000 4.0000 0 0 94.6523
1.0000 3.0000 1.0000 0 94.1512
11.0000 57.0000 1.0000 0 92.8581
11.0000 60.0000 1.0000 0 92.5076
11.0000 59.0000 1.0000 0 94.5065
11.0000 61.0000 0 0 94.9799
11.0000 58.0000 1.0000 0 90.053
]
now i need a matrix as
for example in B matrix the first row value is 1 ,so i need coeesponding valuse to be selected fron A matrix
1.0000 5.0000 1.0000 0 92.5322 1.0000 5.0000 1.0000 0 92.5322
i need for all values in B
and theb the second column mof B must also be done
as
5.0000 1.0000 0 92.5322 5 3 .6 87

回答(1 个)

Walter Roberson
Walter Roberson 2011-11-9
Your A matrix is syntactically invalid, and your example is impossible to follow.

类别

Help CenterFile Exchange 中查找有关 Fluid Dynamics 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by