Clear Filters
Clear Filters

insulin pump output, newbie here

1 view (last 30 days)
my8950
my8950 on 8 May 2015
Answered: Anas El Fathi on 20 Jul 2017
Hello, I am a new user, starting small here by trying to make an x/y plot with data from my insulin pump. The software provides a .csv file, from there I would like to create a script within matlab to read the file, and plot the results in a graph. There is a header in the file, and the parameter names start on line 11, this will/should stay constant. What I'm wondering for starters is how to import the csv, and get the data into MATLAB. I'd like to plot day by day, with timestamp column/BG reading.
Any helps/books or references are appreciated. Thanks!
Sample file attached below

Answers (2)

Star Strider
Star Strider on 8 May 2015
It would help to have a sample of your actual data file, since it’s impossible to determine how your data are arranged.
I expect that you would read it with xlsread, but we need to see how the dates are imported to write code to read and plot it.
  8 Comments
Star Strider
Star Strider on 11 May 2015
my8950’s ‘Answer’ moved here ...
I did not see this until just now. I'll have to take your file and see, right now I have no idea. I'm just learning, so I'm using this file because I thought it was simple.
Star Strider
Star Strider on 11 May 2015
Apparently the application you’re using (provided by Medtronic?) made it seem simple. The problem is that for whatever reason, the dates do not import as date strings as they should in a normal Excel file, and all the other information appears as NaN. (If it imported as a normal Excel file, the code would have been much simpler. I tried every function I could think of to read it, and failed with all of them.) As it exists, you will have to manually export the file from Excel as a tab-delimited .txt file, then read it.
It would probably be easiest to see if you can export it directly from whatever you’re using to read it to a text file that MATLAB would have no problems with. I would include the insulin dosages as well, since to me, that is important information.
You might also contact Medtronic to see if they’ve developed MATLAB code to read it, or if they have any suggestions on how to export the information you want to a form MATLAB can easily read.

Sign in to comment.


Anas El Fathi
Anas El Fathi on 20 Jul 2017
Hello,
I am also trying to read the carelink data, this post has inspired my solution. I am reading glucose / insulin basal + bolus / Carbs. I converted the txt file to csv and fixed the numbers to use dot "." instead of "," for numbers.
Please find attached the csv file and the script I wrote.
Anas

Categories

Find more on Environment and Settings 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!