Elec4621编程设计辅导、Matlab语言程序调试、Matlab讲解
- 首页 >> Matlab编程 Elec4621 Lab2, T1 2021
This is the first assessable lab. You are required to submit your report
or lab notes by the due date and time set on Moodle.
The file “SN d tot V2.0” under the link “Sun Spot Data” contains historical
observations of the number of sunspots since the year 1818. The first
five columns are (the last three columns can be ignored):
1. Year
2. Month
3. Day
4. Decimal year (that is with the month and day counted as fractions of
a year)
5. Number of sunspots.
Note that an entry of -1 in the number of sunspots indicates that the
observation was not made and data is therefore not available.
The file is in csv format, which you can load into Matlab so that each
column becomes an array variable. You can seek help (either on the internet
or from the demonstrators) on how to do that.
In what follows, unless otherwise stated, you will be ignoring the -1
entries.
1. Load the csv file into Matlab, saving the data in the fourth and fifth
columns into variables ’t’ and ’x’ respectively.
2. Plot the sunspot data versus time (that is x vs t), properly labelling
the axes. Record your observations.
3. What is the sampling period of the data?
1
4. Take the “appropriate” Fourier Transform of the data and plot the
magnitude spectrum. What do you observe? What significant frequency
modes are there and what are their corresponding periods.
5. We would like to check the variations of the modes over time. Break
the data into a number of blocks (each spanning at least 40 years).
Take the FT of each block. Plot the corresponding amplitude spectra
and compare them. What do you obvserve.
6. Discuss your results in light of what is known in the literature about
sunspot activity (that is look up available information from the literature
on sunspot activity and compare your results to them).
2
This is the first assessable lab. You are required to submit your report
or lab notes by the due date and time set on Moodle.
The file “SN d tot V2.0” under the link “Sun Spot Data” contains historical
observations of the number of sunspots since the year 1818. The first
five columns are (the last three columns can be ignored):
1. Year
2. Month
3. Day
4. Decimal year (that is with the month and day counted as fractions of
a year)
5. Number of sunspots.
Note that an entry of -1 in the number of sunspots indicates that the
observation was not made and data is therefore not available.
The file is in csv format, which you can load into Matlab so that each
column becomes an array variable. You can seek help (either on the internet
or from the demonstrators) on how to do that.
In what follows, unless otherwise stated, you will be ignoring the -1
entries.
1. Load the csv file into Matlab, saving the data in the fourth and fifth
columns into variables ’t’ and ’x’ respectively.
2. Plot the sunspot data versus time (that is x vs t), properly labelling
the axes. Record your observations.
3. What is the sampling period of the data?
1
4. Take the “appropriate” Fourier Transform of the data and plot the
magnitude spectrum. What do you observe? What significant frequency
modes are there and what are their corresponding periods.
5. We would like to check the variations of the modes over time. Break
the data into a number of blocks (each spanning at least 40 years).
Take the FT of each block. Plot the corresponding amplitude spectra
and compare them. What do you obvserve.
6. Discuss your results in light of what is known in the literature about
sunspot activity (that is look up available information from the literature
on sunspot activity and compare your results to them).
2