How to plot multivariable functions against each other?

1 次查看(过去 30 天)
Have defined to functions based on biological mechanisms and am trying to plot the two against each other (GF on the x-axis, ECM on y-axis) where the variables in the equations (x and y) are the possible concentrations of the molecules which are reactants. The rest of the constants are defined. For some reason I cannot find a way to plot them?
% Variable Initialization
x = linspace(0,10);
y = linspace(0,10);
% Parameters
v2fak = 0.05; v1fak = 0.04; k2fak = 0.1; k1fak = 0.1; fakt = 1;
kagf = 0.1; kdap1 = 0.15; vs2ap1 = 0.05; kafak = 0.1; vsap1 = 0.05;
GF = [kagf * (kdap1 * x - vs2ap1 * (y / (kafak + y)))] / [vsap1 + vs2ap1 * ...
(y / (kafak + y)) - kdap1 * x];
ECM = (v2fak / v1fak) * (y / (k2fak + y)) * (k1fak + (fakt - y)) / ...
(fakt - y) - [kagf * (kdap1 * x - vs2ap1 * (y / (kafak + y)))] / [vsap1 + vs2ap1 * ...
(y / (kafak + y)) - kdap1 * x];
plot(GF,ECM);

采纳的回答

Star Strider
Star Strider 2018-6-19
Vectorize all the vector multiplications and divisions, and it works:
GF = (kagf * (kdap1 * x - vs2ap1 * (y / (kafak + y)))) ./ (vsap1 + vs2ap1 * ...
(y / (kafak + y)) - kdap1 * x);
ECM = (v2fak / v1fak) * (y ./ (k2fak + y)) .* (k1fak + (fakt - y)) ./ ...
(fakt - y) - (kagf * (kdap1 * x - vs2ap1 * (y ./ (kafak + y)))) ./ (vsap1 + vs2ap1 * ...
(y ./ (kafak + y)) - kdap1 * x);
Also, use parentheses instead of square brackets unless you intend to define matrices with individual elements.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

产品


版本

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by