How to Filter Datasheet

조회 수: 2 (최근 30일)
Jasraj Soni
Jasraj Soni 2019년 9월 8일
답변: Neuropragmatist 2019년 9월 9일
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