How to find data

3 次查看(过去 30 天)
John fredson
John fredson 2022-5-19
Can I ask how to find variables with the same country name, correspond total death, cases and plot it on the graph which in a huge data set like this
  4 个评论
John fredson
John fredson 2022-5-19
@Jan yes the graph should look like number of lines represent the relationship of countries and corresponding accumulated cases and deaths

请先登录,再进行评论。

回答(1 个)

David Hill
David Hill 2022-5-19
t=readtable('owid-covid-data_2020-21.csv');
u=unique(t.Location);
s=zeros(1,length(u));
for k=1:length(u)
s(k)=sum(t.TotalDeaths(ismember(t.Location,u(k))));
end
bar(1:length(u),s)

类别

Help CenterFile Exchange 中查找有关 Live Scripts and Functions 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by