finding the slope and plotting it in graph
1 view (last 30 days)
Show older comments
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 Comments
Walter Roberson
on 21 Apr 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
on 21 Apr 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.
Answers (0)
See Also
Categories
Find more on Annotations in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!