I defined a function funloglogplot
to make a loglogplot of a function (function1
) depending on several variables
funloglogplot[function1_, xmin_, xmax_, numpoints_] :=
Module[{list1, listRe, listIm},
list1 = {#1, function1[eps1, 1, #1, R1ideal, R2, ordre]}& /@
logspace[xmin, xmax, numpoints];
listRe = {#1[[1]], Re[#1[[2]]]}& /@ list1;
listIm = {#1[[1]], -Im[#1[[2]]]}& /@ list1;
ListLogLogPlot[{listRe, listIm}, Joined -> True]
]
Nevertheless I would like to be able to choose the variables I am using for the plot (in this case I plot function1
as a function of its 3rd argument and I would like to be able to select the argument).
Can anyone see a solution?
f[x_, y_] := Sin[x/y]; funPlot[f_, var_] := Plot[f, var]; GraphicsRow[{funPlot[f[a, 1], {a, 1, 2}], funPlot[f[1, a], {a, 1, 2}]}]
$\endgroup$#1
in an other place for example like thisfunction1[eps1, 1, 1, #1, R2, ordre]
(the#1
is at fourth position this time) $\endgroup$#1
I useda
. What other difference is between my try and your intent? $\endgroup$Map
(or&/@
) with this formulation? $\endgroup$