How to find data

조회 수: 3 (최근 30일)
John fredson
John fredson 2022년 5월 19일
댓글: 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일
@David Hillyes please
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