How to calculate gradient from semilogy plot graph?
3 views (last 30 days)
Show older comments
I have data and already plotted in semilogy graph,
I need to know the gradient from that graph
Any one can help me, please?
I use Matlab 2016b versiaon

0 Comments
Accepted Answer
Torsten
on 14 Jul 2022
In the left part, your functional equation is approximately
f(x) = 10^(-3.2*x+70)
I don't know from your question whether you mean the gradient of your original function f(x) or that of log10(f(x)) that is shown in the plot.
5 Comments
Torsten
on 15 Jul 2022
Edited: Torsten
on 15 Jul 2022
I think I made a mistake in the calculation of your pressure function.
I assumed that in the semilogy plot, log(p) is plotted against t. But that's not true - it's also p that is shown.
The following code should be correct:
b = log10(70);
a = log10(6/70)/30;
syms t
p = 10^(a*t+b);
double(subs(p,t,0))
double(subs(p,t,30))
gradp = diff(p,t);
p = matlabFunction(p);
gradp = matlabFunction(gradp);
t = 0:0.1:40;
plot(t,p(t))
plot(t,gradp(t))
More Answers (0)
See Also
Categories
Find more on MATLAB Mobile Fundamentals 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!