als blutiger Anfänger habe ich versucht folgendes kurzes Matlabscript,
Code: Alles auswählen
x=(0:0.1:5);
w = 2;
s = 20;
zet = linspace(0.2,10,6);
figure(1)
for s=zet
n = 2-erf(x/(2*(w*s)^(1/2)));
plot(x,n)
hold on
xlabel('x');
ylabel('y')
end
Code: Alles auswählen
# -*- coding: utf-8 -*-
import numpy as np
import pylab as pl
from math import erf
x = np.arange(0,5,0.1)
zet = np.linspace(0.2,10,6)
w = 2
s = 20
for s in zet:
np_erf = np.vectorize(erf)
e = 2-np_erf(x/(2*(w*s)**(1/2)))
pl.figure()
pl.hold(True)
pl.plot(x,e)
pl.xlabel('x')
pl.ylabel('y')
pl.show()