Filter löschen
Filter löschen

How to get specific data from specified rows and variables in a table?

2 Ansichten (letzte 30 Tage)
I have created this table
Sensor_type=["COB4_St1";"COB4_St2";"COB4_St3";"COB4_St4";"COB4_St5";"COB4_St6";"NOB4_St1";"NOB4_St2";"NOB4_St3";"NOB4_St4";"NOB4_St5";"NOB4_St6";"NO2B43F_St1";"NO2B43F_St2";"NO2B43F_St3";"NO2B43F_St4";"NO2B43F_St5";"NO2B43F_St6";"OXB431_St1";"OXB431_St2";"OXB431_St3";"OXB431_St4";"OXB431_St5";"OXB431_St6"]; Sensitivity=[0.437;0.437;0.483;0.429;0.438;0.398;0.509;0.550;0.492;0.520;0.579;0.614;0.321;0.353;0.330;0.360;0.356;0.358;0.325;0.346;0.346;0.377;0.358;0.372]; Electronic_Zero_WE=[0.360;0.357;0.357;0.355;0.357;0.351;0.296;0.295;0.295;0.295;0.287;0.279;0.230;0.216;0.225;0.230;0.219;0.232;0.235;0.216;0.239;0.221;0.234;0.215]; Electronic_zero_AUX=[0.354;0.351;0.356;0.348;0.338;0.362;0.286;0.291;0.287;0.292;0.289;0.288;0.219;0.226;0.225;0.231;0.224;0.232;0.231;0.235;0.220;0.231;0.230;0.213];
Table= table(Sensor_type,Sensitivity,Electronic_Zero_WE,Electronic_zero_AUX);
I need to get the sensitivity of COB4_St1 and use it in the fuction.
S = A - sensitivity of COB4.
How can I write this on Matlab.
Thank you!

Akzeptierte Antwort

Ridwan Alam
Ridwan Alam am 12 Dez. 2019
Bearbeitet: Ridwan Alam am 12 Dez. 2019
S = A - Table.Sensitivity(Table.Sensor_type=="COB4_St1")

Weitere Antworten (1)

Bhaskar R
Bhaskar R am 12 Dez. 2019
S = A -table2array(Table(1, 2)); % where Table(1, 2) indicates 1 row second column i.e Sensitivity values of "COB4_St1"
For more info of table indexing read

Kategorien

Mehr zu Tables 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!

Translated by