Filtering excel data!

12 ビュー (過去 30 日間)
Jonathan Treece
Jonathan Treece 2020 年 12 月 4 日
コメント済み: Cris LaPierre 2020 年 12 月 4 日
Hello!
I have a large excel file (A1:E14920) that contains data from covid cases from every state from January to November. I need my code to promt the user to pick state (In coloumn B) and create a plot with the dates (column A) and # of Deaths (column E). Anyone know how I can do this? Thank you!

回答 (1 件)

Cris LaPierre
Cris LaPierre 2020 年 12 月 4 日
編集済み: Cris LaPierre 2020 年 12 月 4 日
I would suggest using logical indexing (Ch 12 MATLAB Onramp) to select the dates and #Deaths that match the user selection. From there, just plot the corresponding data (Ch 9 MATLAB Onramp). If your dates are imported as datetimes, they will appear as your xticks automaticaly. I'd import the file using readtable (see more here).
Personally, I'd use a live script with a drop-down list (see Interactive Controls) to select the state.
  2 件のコメント
Jonathan Treece
Jonathan Treece 2020 年 12 月 4 日
Do you know how to get this stared. Im not to familiar with Matlab yet
Thanks!
Cris LaPierre
Cris LaPierre 2020 年 12 月 4 日
I suggest MATLAB Onramp.

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

カテゴリ

Help Center および File ExchangeMATLAB Compiler SDK についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by