0
$\begingroup$

Suppose I have a function f[a,b,c] and would like to plot the values of f[a,b,c] for a range of $\frac{a}{b}$ and a range of $c$. That is, I'd like to see the change in the function over various $\frac{a}{b}$ for each value of $c$. Does anyone know how this could be done?

Any help appreciated.

$\endgroup$
  • $\begingroup$ Can f[a,b,c] = a+b+c. If yes then you would have to specify either a or b right. Or is the function only made of ratios of a/b and c. $\endgroup$ – Hubble07 Dec 26 '16 at 8:22
  • $\begingroup$ @Hubble07 Yes, it can be expressed as $a + b + c$. However I'd like to constrain the ratio of $a$ and $b$ though, without setting either value. $\endgroup$ – John M. Dec 26 '16 at 8:38
  • $\begingroup$ Does your f satisfy a "homogeneity relation"; i.e., a relationship between f[a, b, c] and f[a/b, 1, c]? $\endgroup$ – J. M. will be back soon Dec 26 '16 at 10:21
0
$\begingroup$

Let your function be simply a+b+c then you can do the following:

f[d_, c_] := Module[{a = 1, b},
b = a/d;
a + b + c]


Plot[{f[d, 1], f[d, 2]}, {d, 1, 5}, PlotRange -> Full, Frame -> True, 
PlotLegends -> "Expressions"]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.