How to Filter Datasheet

5 次查看(过去 30 天)
Jasraj Soni
Jasraj Soni 2019-9-8
datasheet = [1 2 3 4; 5 6 7 8; 9 10 11 12; 13 14 15 16] // Datasheet (rows: 4, Columns: 4)
Now creating Column Vectors based on above datasheet
A = [1; 5; 9; 13]
B = [2; 6; 10; 14]
C = [3; 7; 11; 15]
D = [4; 8; 12; 16]
Creating new column Vectors from above vectors based on few constraints
A1 = [1; 9]
PA1 = [1; 3] //position vector of A1 from A
B1 = [6; 10; 14]
PB1 = [2; 3; 4] //position vector of B1 from B
C1 = [7; 11]
PC1 = [2; 3] //position vector of C1 from C
D1 = [4; 12]
PD1 = [1; 3] //position vector of D1 from D
FILTERED DATASHEET
F_datasheet = [9 10 11 12] // As you can see the datasheet is filtered based on the above position vectors.
My Objective:
How to get a filtered datasheet which includes ONLY those rows where PA1, PB1, PC1, PD1 have common values (i.e. here its only 3)?

回答(1 个)

Neuropragmatist
Neuropragmatist 2019-9-9
Why do you want to do this?
Its certinaly poossible to write code to do what you want, I'm just wondering if maybe there is a more efficient way to do what you ultimately want...
M.

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by