How to extract the data in a column with the information of another column
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Mario
el 19 de Ag. de 2022
Editada: Akira Agata
el 20 de Ag. de 2022
Hello!!
I need to extract the force of right and left leg but in double contact phase. Each data is in different column, and I need to use the criteria of the double contact to extract the force of bouth legs.
Thanks for the help!!
xlsread('3kmFES_001a.xlsx')
1 comentario
Matt J
el 19 de Ag. de 2022
I don't think anyone here knows what "the criteria of the double contact" is. Also, your posted data has 10 unlabeled columns. We don't know which ones are the force or for which leg.
Respuesta aceptada
Voss
el 19 de Ag. de 2022
t = readtable('3kmFES_001a.xlsx')
t_LR_F_Double = t(t.DoubleContact == 1,{'RIGHT_Fz_N_' 'LEFT_Fz_N_'})
1 comentario
Akira Agata
el 20 de Ag. de 2022
Editada: Akira Agata
el 20 de Ag. de 2022
+1
It's better to set "VariableNamingRule" option of readtable function to "preserve" to avoid unexpected warning message, like:
% Read data from Excel file
T = readtable("3kmFES_001a.xlsx", "VariableNamingRule", "preserve");
% Row index of "Double Contact" == 1
idx = T.("Double Contact") == 1;
% Extract the target data
T_out = T(idx, ["LEFT_Fz (N)", "RIGHT_Fz (N)"]);
Más respuestas (0)
Ver también
Categorías
Más información sobre Spreadsheets en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!