Install new info.

6 次查看(过去 30 天)
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 个评论
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 CenterFile Exchange 中查找有关 Line Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by