Creating Table From Excel Data
13 ビュー (過去 30 日間)
古いコメントを表示
GAS = greenhousegasinventorydatadata(greenhousegasinventorydatadata.category == 'Methane')
Ireland = GAS(GAS.country_or_area == 'Ireland', 2:3)
Sweden =
Switzerland =
Poland =
subplot(2,2,1)
plot(Ireland.year,Ireland.value)
title ('Ireland')
_______________________________________________________________________________________________________________________________________
This is some sample code for loading excel data using logical indexing into a table then plotting it. However, I am just confused what the periods stand for
in certain cases like Ireland.year and GAS.country_or_area. Thanks in advance!
0 件のコメント
回答 (2 件)
Peter Perkins
2019 年 5 月 3 日
It almost looks like you have table namednamed "greenhousegasinventorydatadata", and one of the variables in that table is called "category", and it's a categorical variable, one of whose categories is named "Methane", and you getting the subset of Methane rows into a smaller table named GAS, and another variable in "greenhousegasinventorydatadata" carried over to GAS is named "country_or_area", and it's categorical, one of whose categories is names "Ireland", and you are getting the subset of Ireland rows for two of the variables.
I say "almost", because your first line of code is a self-explanatory error if greenhousegasinventorydatadata is indeed a table.
Just guessing.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!