How can i find the value in one point of the graph?
Show older comments
Hi guys
So, I have this script with a equation of a curve and a I created a tangent line to find a value on the y axis
thb=nlinfit(t,hb,f,alfa0);
hbf=thb(1)+thb(2)*(thb(3).^t); %(curve equation)
tponto=3000.0;
dhbfdt=(thb(2)*log(thb(3)))*thb(3)^tponto;
declive=dhbfdt;
iponto=find(t==tponto);
hponto=hbf(iponto)
imax=length(t);
hlinear=zeros(imax,1);
for i=1:imax
hlinear(i)=hponto+declive*(t(i)-tponto); %(tangent line)
end
figure(2)
hold on
plot(t,hb,'o','LineWidth',2)
plot(t,hbf,'-','LineWidth',2)
plot(t,hlinear);
axis([0 7200 0 0.25])
xlabel('Tempo/s')
ylabel('Altura da Interface/m')
hold off

I want to know the value of y in this red dot. How can I do this?
Thank you
Accepted Answer
More Answers (0)
Categories
Find more on 2-D and 3-D Plots 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!