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:
Detect the change in slope

Subject: Detect the change in slope

From: Suman

Date: 25 Sep, 2013 08:50:05

Message: 1 of 3

I have a data set that represent slope. I want to detect the point where there is a big change in the slope.
The sample data set looks like this
  -0.9630
   -0.9151
   -0.9273
   -1.0041
   -0.8851
   -0.7854
   -0.7854
   -0.7854
   -0.6435
   -0.7266
   -0.6747
   -0.9420
   -0.8380
   -0.9420
   -0.8961
   -1.0714
   -1.0427
   -0.9828
   -1.2490
   -1.0714
   -0.9828
   -1.0041
   -0.9098
    1.1071
    2.1375
    2.0701
    2.1112
    1.9513
    1.8925
    1.9757
    2.0344
    2.1375
    2.1815
    1.9974
    2.0701
    2.2455
    2.0989
    2.1815
    2.2318
    2.2318
    2.2974
    2.1815
    2.3562
    2.3562
    2.6345
    2.6012
    2.6779
    2.7150
    0.0204
   -1.0714
   -1.0041
   -0.7854
   -0.8380
   -0.9420
   -0.8380
   -0.7328
   -0.6747
   -0.6747
   -0.8851
   -0.9420
   -0.9420
   -0.9601
   -1.0041
   -1.1071
   -1.1071
   -0.9828
   -1.0191
   -1.3045
   -1.0041
   -1.0714
    1.0273
    2.1112
    2.0701
    2.1375
    2.1815
    2.2974

I find it difficult to handle this because of the changing sign.
Hope I can get some help.
Thanks in advance.

Subject: Detect the change in slope

From: dpb

Date: 25 Sep, 2013 13:42:50

Message: 2 of 3

On 9/25/2013 3:50 AM, Suman wrote:
> I have a data set that represent slope. I want to detect the point where
> there is a big change in the slope. The sample data set looks like this
> -0.9630
...
> -0.9098
...
> 2.1375
> 2.1815
> 2.2974
>
> I find it difficult to handle this because of the changing sign.
...

find(abs(diff(sign(s)))==2)

--

Subject: Detect the change in slope

From: someone

Date: 25 Sep, 2013 13:49:08

Message: 3 of 3

"Suman " <smnmehta.jsr@gmail.com> wrote in message <l1u83t$iqc$1@newscl01ah.mathworks.com>...
> I have a data set that represent slope. I want to detect the point where there is a big change in the slope.
> The sample data set looks like this
> -0.9630
> -0.9151
... snip ...
> 2.1815
> 2.2974
>
> I find it difficult to handle this because of the changing sign.
> Hope I can get some help.
> Thanks in advance.

% I'm not sure what you mean by "big" change,
% But I suspect the MATLAB DIFF function can help you.

doc diff

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