I have a function
function f=ejer3(a,x)
f=1/(1+exp(a*x))
endfunction
Now I want to plot this function for three values of a (a=0.5,1,2) and 100 values of x between -4 and 4. That is to say, I want to plot three functions f1, f2, f3; each one is plotted using one value of a and the 100 values of x.
For example:
x=linspace(-4,4)
f1=1/(1+exp(0.5*x))
And plotting f1.
How do I do this? Do I have to use a for loop? I'm new in scilab.