how could i sub in the y value to find the x value for the function
2 views (last 30 days)
Show older comments
k1=0.000358;
k2=0.000158;
ca0=4.89;
x=1:10000;
f = @(x) 0.000358.*4.89.*x./(1+0.000358.*x+0.000158.*x+0.000158*0.000358*x.^2);
g = @(x) 4.89./(1+0.000385.*x);
h = @(x) 4.89.*0.000358.*0.000158.*x.^2/(1+0.000358.*x+0.000158.*x+0.000158.*0.000358*x.^2);
[i,m] = max(f(x))
plot(x,f(x),x,g(x),x,h(x))
legend('cb','ca')
i found the max value i just want to sub it back to the equation to find the x value
0 Comments
Answers (1)
VBBV
on 26 Oct 2021
k1=0.000358;
k2=0.000158;
ca0=4.89;
x=1:10000;
f = @(x) 0.000358.*4.89.*x./(1+0.000358.*x+0.000158.*x+0.000158*0.000358*x.^2);
g = @(x) 4.89./(1+0.000385.*x);
h = @(x) 4.89.*0.000358.*0.000158.*x.^2/(1+0.000358.*x+0.000158.*x+0.000158.*0.000358*x.^2);
[i,m] = max(f(x));
plot(x,f(x),x,g(x),x,h(x));
legend('cb','ca')
x(m)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!