Install new info.

6 ビュー (過去 30 日間)
Nathan Formby
Nathan Formby 2019 年 9 月 14 日
コメント済み: Walter Roberson 2019 年 9 月 15 日
Your field team is going to collect additional data 5 days after the last day of previously recorded data. Prompt the user to enter the ice thickness data for this day, for all locations. Additionally, on this day a new location was found and recorded. Prompt the user to enter the new location ID and the ice data for the new location on this day. Update the Days vector with the new day, the LocationID string array with the new location, and the Ice matrix with the newly recorded data. Fill in the Ice matrix with the user-inputted ice data value for that location. Save the three updated variables as MA2_Task2.mat. On the command window, output the new location ID and the average ice thickness of the new day.
NOTE (avoid hardcoding)
How do I install new data to a workspace?
  3 件のコメント
Walter Roberson
Walter Roberson 2019 年 9 月 14 日
Rik
Rik 2019 年 9 月 15 日
Install new data? You mean load data from a mat file? If you enter load data matlab into your favorite internet search engine you will find the documentation of the load function that should do just that.

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

採用された回答

Walter Roberson
Walter Roberson 2019 年 9 月 15 日
LocationID(6) = "some new string"
Days(17:21) = vector of 5 day numbers
Ice(17:21,6) = vector of 5 numeric values
  2 件のコメント
Cody Abt
Cody Abt 2019 年 9 月 15 日
I get LocationId(6) to work, but Days(17:21)=65 stacks like 5 65s at the bottom of my days on the code and same goes as ice when i enter 1.68 for it.
Walter Roberson
Walter Roberson 2019 年 9 月 15 日
The right hand side of
Days(17:21)=65
is not a vector of 5 day numbers, it is a single day number.
You can keep track of where you are and enter one at a time:
for dayidx = 17:21
Days(dayidx) = scalar numeric value
end

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLine Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by