Navigation : Top/MATLAB Practice 7

MATLAB Practice 7


#author("2022-06-06T12:46:25+09:00","default:mori","mori")
#author("2022-06-06T12:47:42+09:00","default:mori","mori")
*Read/write data + Fourier analysis [#k79e187b]

+ Read csv (comma separated) data 'dat_climate.csv'.
-- the first line is the date and time, the second line is the data.
 # textscan, format is '%s %f'.
+ Convert the read time data (string) to numeric values.
 # datenum
+ Interpolate the data to day by day.
 # interp1
+ plot a linear trend based on the interpolated data.
 # smooth, polyfit, polyval
http://www.oceanwave.jp/?plugin=ref&page=MATLAB%B1%E9%BD%AC%CC%E4%C2%EA%A1%A7CSV%A5%C7%A1%BC%A5%BF%A4%CE%C6%C9%A4%DF%B9%FE%A4%DF%A4%C8%BD%F1%A4%AD%BD%D0%A4%B7%A4%C8%A5%C8%A5%EC%A5%F3%A5%C9%B2%F2%C0%CF%A4%CE%B4%F0%C1%C3%20%CC%E4%C2%EA&src=example_climatedata_1.jpg
- Calculate the spectrum of the data and find the number of eigendays (1/f). 
 # pwelch, semilogx
&ref(example_climatedata_2.jpg);http://www.oceanwave.jp/?plugin=ref&page=MATLAB%B1%E9%BD%AC%CC%E4%C2%EA%A1%A7CSV%A5%C7%A1%BC%A5%BF%A4%CE%C6%C9%A4%DF%B9%FE%A4%DF%A4%C8%BD%F1%A4%AD%BD%D0%A4%B7%A4%C8%A5%C8%A5%EC%A5%F3%A5%C9%B2%F2%C0%CF%A4%CE%B4%F0%C1%C3%20%CC%E4%C2%EA&src=example_climatedata_2.jpg
http://www.oceanwave.jp/?plugin=ref&page=MATLAB%B1%E9%BD%AC%CC%E4%C2%EA%A1%A7CSV%A5%C7%A1%BC%A5%BF%A4%CE%C6%C9%A4%DF%B9%FE%A4%DF%A4%C8%BD%F1%A4%AD%BD%D0%A4%B7%A4%C8%A5%C8%A5%EC%A5%F3%A5%C9%B2%F2%C0%CF%A4%CE%B4%F0%C1%C3%20%CC%E4%C2%EA&src=example_climatedata_2.jpg

*Data [#y20ce9ab]
- [[CSV data>http://www.oceanwave.jp/?plugin=attach&refer=MATLAB%B1%E9%BD%AC%CC%E4%C2%EA%A1%A7CSV%A5%C7%A1%BC%A5%BF%A4%CE%C6%C9%A4%DF%B9%FE%A4%DF%A4%C8%BD%F1%A4%AD%BD%D0%A4%B7%A4%C8%A5%C8%A5%EC%A5%F3%A5%C9%B2%F2%C0%CF%A4%CE%B4%F0%C1%C3%20%CC%E4%C2%EA&openfile=dat_climate.csv]]