Calling Upon previous anonymous function results for use in a second anonymous function
Mostrar comentarios más antiguos
I am plotting an anonymous function which produces values that I would like to use in plotting a second anonymous function. Is there anyway to store values of of the function obtained on the interval of the anonymous variable?
2 comentarios
Greg
el 15 de En. de 2018
Can you post the relevant code to give us something to work with?
Respuesta aceptada
Más respuestas (1)
Steven Lord
el 15 de En. de 2018
You want y to be a function of x1 that uses the existing P_x function?
% Sample values for Psat1 and Psat2
Psat1 = 1;
Psat2 = 2;
P_x = @(x1) Psat2 + (Psat1 - Psat2)*x1;
fplot(P_x,[0,1])
y = @(x1) x1*Psat1/P_x(x1)
Categorías
Más información sobre Mathematics en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!