Got Questions? Get Answers.
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:
determining local trend

Subject: determining local trend

From: Konst

Date: 9 Oct, 2012 14:16:07

Message: 1 of 2

I have a time series of length N. What I need to do is devide it into N/n non-overlapping fragments that each has n observations. Then I need to determine the local trend of each 'box'. Any idea how to do this?Thanks in advance.

Subject: determining local trend

From: Konst

Date: 10 Oct, 2012 14:22:08

Message: 2 of 2

"Konst " <konstance1@hotmail.com> wrote in message <k51bj7$fd1$1@newscl01ah.mathworks.com>...
> I have a time series of length N. What I need to do is devide it into N/n non-overlapping fragments that each has n observations. Then I need to determine the local trend of each 'box'. Any idea how to do this?Thanks in advance.


I managed to devide into boxes like this:
y=randn(500,1);
while i<N
    figure
    box=y(i+1:i+n);
    plot (box)
    i=i+n;
end

It works ok..Any idea about the trend of each box?

Tags for this Thread

No tags are associated with 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