Plotting date time Hear rate and Stress in the same plot and/or in different plots

1 回表示 (過去 30 日間)
Hi htere,
i have a CSV file (containing Date, Sleep Time, Heart Rate and Stress data) which I am attaching as well. I want to plot date on the x-axis (all dates with only one day iteration),
then I want to see how much the person slept each day?
How much was his Hear Rate every day?
How much was the Stress Level every day?
i am totally new to the MATLAB so don't know much differences between tableread and csv read plus a newbie on syntax as well. Struggling a lot. Also, if someone could kindly help what other patterns can be made/obtained using this data would be great!
Many thanks in advance!

採用された回答

Peter Perkins
Peter Perkins 2019 年 6 月 4 日
After a bit of cleaning up, I get this timetable:
>> TT = readtimetable('SHS.csv');
>> TT.Time.Format = "dd-MMM-yyyy";
>> TT.Var3 = duration(TT.Var3,"Format","hh:mm");
>> TT = TT(:,3:5);
>> TT.Properties.VariableNames = ["SleepTime" "HeartRate" "Stress"]
TT =
84×3 timetable
Time SleepTime HeartRate Stress
___________ _________ _________ ______
21-Feb-2019 09:00 60 41
22-Feb-2019 06:09 68 34
23-Feb-2019 09:18 61 14
24-Feb-2019 08:00 63 24
25-Feb-2019 07:30 67 26
26-Feb-2019 07:04 66 20
[snip]
Plotting is easy, perhaps this:
>> plot(TT.Time,TT.SleepTime)
untitled1.png
or perhaps this:
>> stackedplot(TT)
untitled2.png
  2 件のコメント
Zaffar Mughal
Zaffar Mughal 2019 年 6 月 4 日
Ah Many thanks! You are great! Could you please help me with some feature extraction, e.g. if I want to see my HEART RATE/Stress Level/SLEEP TIMING during the weekdays and weekend? Do you have any other features we can extract from this tiny data set? Its only one person data so the age,sex,ethnicity features can't be added up. BUT if you have anyother features in mind plz plz plz let me know and also weekend vs weekend visualization. Also, after the features extraction I want to carry on PCA and Clustering. i shall be and am grateful to you for this favor. YOU ARE A SUPERSTAR SIR! MUCH MUCH MUCH APPRECIATED.
Peter Perkins
Peter Perkins 2019 年 6 月 5 日
Those are questions that you, the data analyst, need to answer for yourself.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGraphics Objects についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by