copying matrix values based on another matrix value in MATLAB

1 次查看(过去 30 天)
Hi I am trying to perform this on MATLAB
A =
64 2 3 61 60 6 7 57
9 55 54 12 13 51 50 16
17 47 46 20 21 43 42 24
40 26 27 37 36 30 31 33
32 34 35 29 28 38 39 25
41 23 22 44 45 19 18 48
49 15 14 52 53 11 10 56
8 58 59 5 4 62 63 1
I want to select values from A based on F
F =
0
0
0
-1
0
-1
-1
-1
I want this output
u =
40 26 27 37 36 30 31 33
41 23 22 44 45 19 18 48
49 15 14 52 53 11 10 56
8 58 59 5 4 62 63 1
This means that I want all the values corresponding to '-1' in a matrix.

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2016-8-5
编辑:Azzi Abdelmalek 2016-8-5

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Operators and Elementary Operations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by