sinevaldocumentation

sinevalproduces a sinusoid of specified amplitude and phase with a frequency of 1/yr.

For related functions, seesinefitandsinefit_bootstrapdocumentation.

Back to Climate Data Tools Contents

Contents

Syntax

y = sineval(ft,t)

Description

y = sineval(ft,t)evaluates a sinusoid of given fit parametersftat timest. Timestcan be in datenum, datetime, or datestr format, and parametersftcorrespond to the outputs of thesinefitfunction and can have 2 to 5 elements, which describe the following:

Example

I live in Austin, Texas, where the hottest day of the year occurs around August 12 at around 96 degrees F, and it's about 36 degrees colder in the winter. In ther words, the amplitude of the seasonal sinusoid might be 18 degrees, where the maximum value occurs on julian day 224, and the mean value is 78 degrees. Using these crude numbers, here's a year's climatology for Austin's daily high temperatures:

% t可以任何日期格式和我t'll be okay:t = days(1:365);% Sinusoid of high temperatures:HighTemp = sineval([18 224 78],t); plot(t,HighTemp) axistightboxoffxlabel'day of year'ylabel'temperature ({\circ}F)'

Author Info

This function is part of theClimate Data Toolbox for Matlab. Thesinefit,sineval, andsinefit_bootstrapfunctions as well as the supporting documentation were written by Chad A. Greene of the University of Texas Institute for Geophysics.