finding the slope and plotting it in graph

i need to find the x,y points and plot those points finding the slope making a line in x,y plane. How can i get it automatically

6 commentaires

Walter Roberson
Walter Roberson le 20 Avr 2019
Is your input the png file itself, and you have to figure out the coordinates of the blue line??
sisir regmi
sisir regmi le 21 Avr 2019
yes its a png file and i need to figure out the coordinated of the lines also i need to find the slope from the coordinates and plot it. Thank you
x=[0.06,.155,.180,.25,.28,.418,.554,1.737,1.822,1.823,1.824,2.029,2.062,2.073,2.075,2.091,2.108,2.11,2.157,3.12,3.26,3.37,3.44,3.54,3.56,3.58,3.92,4.08,4.17,4.19,4.36,4.38,4.39,4.45,4.456,4.44,4.46,4.35,4.55,4.69,5.138,5.28,5.40,5.54,5.67,5.78,5.80,5.81,5.900,5.9001,5.91,5.92,6.19,6.20,6.21,6.423,6.57,6.65,6.71,6.72,6.83,6.85,6.92,7.11,7.25]
y=[13.22,179.6,438.2,687.8,981.3,1152,931,91.24,80.37,37.61,12.09,70.55,96.34,125.6,73.59,57.15,88.75,80.1,111.6,258.1,40.66,42.7,60.61,236.8,239.8,212.1,128.4,46.09,40.58,47.62,90.86,174.5,244.2,316.9,482,614.4,775.3,923.3,782.3,486.9,75.65,35.83,31.34,35.01,28.84,36.18,31.63,16.6,11.6,4.97,11.38,10.54,9.34,13.16,21.86,28.17,73.86,148.5,469.1,763.6,914.6,301.9,192,118.5,79.65,49.06]
x=x';
y=y';
i have taken the points manually now want to find the slope of the points
Walter Roberson
Walter Roberson le 21 Avr 2019
Look in the File Exchange for tag digitize
gradient() for slopes
sisir regmi
sisir regmi le 21 Avr 2019
can we read the x,y coordinates automatically from the avobe figure?
Walter Roberson
Walter Roberson le 21 Avr 2019
There are over 20 File Exchange contributions that do their best to return the line coordinates https://www.mathworks.com/matlabcentral/fileexchange?q=tag%3Adigitize
Your image might be too dense for it to work properly: you effectively have multiple y for each x because of low resolution.
David Wilson
David Wilson le 21 Avr 2019
Are you sure you want the gradient of your data?
I should also comment that from your above (frequency?) plot, it does seem very noisy, and given that extracting the gradient operation tends to amplify the high frequency components, (especially if you do something crude like finite differences), then your resultant plot of the derivative will be very niosy.
If I was to smooth your data, I'd think very carefully about how to do it. I'd probably fit a smoothing spline through the data, and then differentiate that. But plotted over the range you have shown above, it's likely to be a considerable mess.

Connectez-vous pour commenter.

Réponses (0)

Catégories

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by