# Data Points where I need to identify where a tangent to the graph is vertical

4 views (last 30 days)

Show older comments

Hey Experts I need help to identify where a tangent is vertical on a data set that is represented by a graph.

Data_X = [.1 .2 .45 .79 1.29 1.35 1.4 1.925 2.45 2.95 3.36 3.82 3.99 4.16 4.32 4.415 4.51 5.4 5.46 5.575 5.69 5.68 5.73 5.78 5.83 5.93 6.8 6.11 6.15 6.19 6.21 6.24 6.25 6.26 6.14 6.5 6.6 6.7 6.5 6.35 6.2 6.7 6.15 6.14 6.1 5.99 5.85 5.7 5.58 5.61 5.71 5.72 5.57 5.25 4.97 4.64 4.45 4.37 4.31 4.28 4.32 4.39 4.42 4.45];

Data_Y = 1:length(Data_X);

I need to identify the data point where the tangent to the graph is vertical. I cannot make a function for this, because its only a small part of the graph. But if I can find it here, I can find it everywhere.

It cannot be found by maximum, since this is a small piece and there is a bigger value farther down, and Im interested in all of the vertical tangents.

Is there a person that can help me?

Best Retard Mikkel

##### 1 Comment

Roger Stafford
on 15 Feb 2017

### Answers (1)

Star Strider
on 15 Feb 2017

I do not see that ‘Data’ has a ‘vertical’ slope anywhere. Perhaps supplying an independent data vector (since ‘Data’ is the dependent variable) and defining ‘vertical’ would help. The derivative provided by the gradient function would define the slope of ‘Data’ at any point, and nowhere is it high, much less approaching infinity (the definition I would use to define ‘vertical’).

dData = gradient(Data);

figure(1)

plot(Data)

hold on

plot(dData)

hold off

grid

### See Also

### Categories

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!