Slope of experimental data
83 views (last 30 days)
Show older comments
Hello, everyone. I need a help. Thank you in advance. How can I determine the slope of experimental data.
I have this data:
x = [ log(0.12) log(0.09) log(0.06) log(0.03) log(0.015)];
y1 = [ log(313700) log(112100) log(62840) log(4811) log(511.2)];
Thanks for help!
Best regards
Answers (1)
Star Strider
on 17 Jun 2019
To get the instantaneous slope of your data:
dydx = gradient(y1) ./ gradient(x);
then to plot it:
plot(x, dydx)
The gradient function produces output the same size as the input. For vectors, this is the approximate numerical derivative.
0 Comments
See Also
Categories
Find more on Time Series in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!