What's the easiest way to plot a function of multiple variables in a 2D graph by giving some of the input parameters a value. Let's consider a simple example
my.function<-function(a,b,x){a*x^2+b}
Now I want to plot the simple parabola where a=1
an b=0
. So I define a new function:
new.function<-function(x){my.function(1,0,x)};
plot(new.function)
.
Is there any way where I can plot the function without defining new.function
?
Normally I use Mathematica and in Mathematica it would be:
Plot[my.function[1,0,x],{x ... }]