Question
how do you do this matlab 'for' loop question Use a for loop to save maximum, minimum, and average daily temperature data into separate .csv
how do you do this matlab 'for' loop question
Use a for loop to save maximum, minimum, and average daily temperature data into separate .csv data files for each year using the following naming scheme: 'NOAA_Temperature_YYYY.csv' where YYYY is the 4-digit year number, from 1926 to 2021.
After MATLAB executes your for loop, your working directory should contain a list of 96 .csv files, each containing the temperature data for a single year. Each file should have four columns listing the date, max temperature, min temperature, and average temperature.
Note: you can use a dummy file for explanation of the code.
I have this in my script for now
12. (10 pts) To see long-term trends in the data, it may be helpful to average the data to smooth out the fluctuations. Create 5-year averages of the high and low temperatures from 1926 to 2020, i.e., 19 x 2 array containing the averages for the ranges below. 1/1/1926-12/31/1930 1/1/1931-12/31/1935 1/1/2016-12/31/2020 myTableVar=readtable('NOAA Temperature YYYY.xlsx'); maxT myTableVar. TMAX; mint myTableVar.TMIN; dates=myTableVar(:,6); hist Temptable=myTableVar (:, [6 27 25]); avgT=(maxT-minT)/2; 12. (10 pts) To see long-term trends in the data, it may be helpful to average the data to smooth out the fluctuations. Create 5-year averages of the high and low temperatures from 1926 to 2020, i.e., 19 x 2 array containing the averages for the ranges below. 1/1/1926-12/31/1930 1/1/1931-12/31/1935 1/1/2016-12/31/2020 myTableVar=readtable('NOAA Temperature YYYY.xlsx'); maxT myTableVar. TMAX; mint myTableVar.TMIN; dates=myTableVar(:,6); hist Temptable=myTableVar (:, [6 27 25]); avgT=(maxT-minT)/2Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started