! exp_3.pcm
clear
! read in the data
read\format\noerror exp_3.dat (*) x,y,dy
! plot the data
label\x `Voltage, V'
label\y `Power, W'
set colour 1 1
set pchar -4
graph x,y,dy
! fit and plot the curve
scalar\vary A,T,w,phi
! initial values for parameters
A=2.3
w=6.5
phi=0
T=10.
fit y=A*cos(w*x+phi)*exp(-x**2/T)
fit\update f
set colour 2 2
set pchar 0
graph\noaxes x,f
For info, write to: [email protected]