Navigation : Top/MATLAB Practice 7

Read/write data + Fourier analysis

  1. 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'.
  2. Convert the read time data (string) to numeric values.
    # datenum
    datenum' + Interpolate the data to day by day.
    # interp1
    interp1 + plot a linear trend based on the interpolated data.
    # smooth, polyfit, polyval
    &ref(): File not found: "example_climatedata_1.jpg" at page "MATLAB Practice 7";
  • Calculate the spectrum of the data and find the number of eigendays (1/f).
    # pwelch, semilogx
    &ref(): File not found: "example_climatedata_2.jpg" at page "MATLAB Practice 7";

Data

  • CSV data:&ref(): File not found: "dat_climate.csv" at page "MATLAB Practice 7";