Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
comparison of slopes

Subject: comparison of slopes

From: Greg Thom

Date: 11 May, 2010 10:54:06

Message: 1 of 2

Hai Matlab Users , specifically stats toolbox experts.

Here is my problem. A general statistics problem, which might be solved by matlab.

I have 5 measurements of the deviation ( from a baseline) of a temperature at 5 times of the day each day. I have made measurements for 50 days. So 5 * 50 measurements.

Now I need to compare these deviations for all the days and see if there is a "pattern" repeating accross number of days. I have been thinking of using slopes (calculated using five measurements per day) and then compare the slopes. What test can achieve this in matlab ?Is there a better way of comparing the means or slopes knowing that they have been computed from five sample points only ?

Thank you

Greg

Subject: comparison of slopes

From: Roger Stafford

Date: 11 May, 2010 21:20:22

Message: 2 of 2

"Greg Thom" <gregthom99@yahoo.com> wrote in message <hsbd0d$dnp$1@fred.mathworks.com>...
> Hai Matlab Users , specifically stats toolbox experts.
>
> Here is my problem. A general statistics problem, which might be solved by matlab.
>
> I have 5 measurements of the deviation ( from a baseline) of a temperature at 5 times of the day each day. I have made measurements for 50 days. So 5 * 50 measurements.
>
> Now I need to compare these deviations for all the days and see if there is a "pattern" repeating accross number of days. I have been thinking of using slopes (calculated using five measurements per day) and then compare the slopes. What test can achieve this in matlab ?Is there a better way of comparing the means or slopes knowing that they have been computed from five sample points only ?
>
> Thank you
>
> Greg

  If you know the times of day the temperatures were taken at, this is just a problem in regression with time of day as the independent variable and temperature the dependent variable. Matlab is good at solving that kind of problem using the back slash operator ('\'). The "time" slope you obtain will be the best-fitting slope in a least squares sense.

Roger Stafford

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us