Trying to get all values for corresponding columns
2 views (last 30 days)
Show older comments
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 Comments
Accepted Answer
Voss
on 25 Feb 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 Comments
More Answers (0)
See Also
Categories
Find more on Database Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!