Plotting data for COVID-19 case

JongHyeon Choe on 21 Jun 2021 (Edited on 21 Jun 2021)
Latest activity Reply by Christopher Stapels on 21 Jun 2021

Could you help me know what problem is in this code? I'm trying to show one plot by App Designer. Without App Designer, below code is working to make a plot. Could you let me know how I could make a plot by using the attached file? Thank you!

   properties (Access = private)
        TimePoints 
        Raw_Data % Data for only case & death
        Case
        Death
    end
    methods (Access = private)
        function startupFcn(app)
load covid_data.mat data;
app.Raw_Data = cell2mat(covid_data(2:end,3:end));
Temp = covid_data(1,3:end);
app.TimePoints = datetime(Temp);
app.Case = sum(app.Raw_Data(:,1:2:end));
app.Death = sum(app.Raw_Data(:,2:2:end));
yyaxis(app.UIAxes,"left");
plot(app.UIAxes,app.TimePoints,app.Case);
yyaxis(app.UIAxes,"right");
plot(app.UIAxes,app.TimePoints,app.Death);
        end
Christopher Stapels
Christopher Stapels on 21 Jun 2021

Here is a channel I use for plotting COVID data. All you need to do is write the data to the channel, and ThingSpeak takes care of generating the plot with live data.

Tags

No tags entered yet.