- #1
Dr_Pill
- 41
- 0
Matlab rook here,
Suppose I'd want to plot the Gaussian for 10 different values for n:
And then I'll type gauss(3,10) to plot 10 curves in the interval [-3,3]
Also, if I'd want to plot in 10 different colors, how can I manage that?
Thanks in advance.
Suppose I'd want to plot the Gaussian for 10 different values for n:
Code:
function gauss(c,n) = plot_gaussian.m
x=-1*c:0.1:c;
gauss(x,j)=sqrt(j./pi)*exp(-1*j.*x.^2);
for j=1:n
plot(x,y)
end
Also, if I'd want to plot in 10 different colors, how can I manage that?
Thanks in advance.
Last edited: