Trying to get all values for corresponding columns
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Nathaniel Porter
el 24 de Feb. de 2022
Respondida: Voss
el 25 de Feb. de 2022
1) Converted pdf to column vectors(string)
2) Trying to obtain all the values in fourth(glucose) corresponding to third column that range between (48-64)
3) Belive I am only getting the number of values related to each
clear
str = extractFileText("data-01.pdf");
data=split(str);
date=data(1:4:end)
time=data(2:4:end)
third=data(3:4:end)
glucose=data(4:4:end)
val = 0;
for k = 1:length(third)
if (k>= 48 && k<= 64)
val = (glucose(k,:));
end
end
0 comentarios
Respuesta aceptada
Voss
el 25 de Feb. de 2022
Hard to say for sure without the pdf file, but maybe something like this will work:
clear
str = extractFileText("data-01.pdf");
data=split(str);
date=data(1:4:end)
time=data(2:4:end)
third=data(3:4:end)
glucose=data(4:4:end)
val = [];
for k = 1:length(third)
third_val = str2double(third(k));
if third_val >= 48 && third_val <= 64
val(end+1) = str2double(glucose(k));
end
end
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Database Toolbox 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!