How to find X value given Y value and show it
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am trying to find a value in a plot that is generated using the following matlab function. I've tried using this z=find(y==0.0625); but it doesn´t seem to be working.
function con = funcCon (cMax)
% Time when the max concentration happens.
B = 3;
% mg to administer.
A = (cMax / B) * exp(1);
% Time.
t = [1:50];
y(1,1) = 0;
for i = 2:50
con = A*t(1,i)*exp(-t(1,i)/B);
y(1,i) = con;
end
plot(t,y)
end
0 comentarios
Respuestas (1)
Image Analyst
el 30 de En. de 2021
See the FAQ:
Try this
[yMax, indexOfMax] = max(y)
tMax = t(indexOfMax)
0 comentarios
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!