PHY113 Python Lab (Exercise 5)

Here’s the solution:

# Exercise 5: Load Radioactive Decay Data
# Load Data
filename = "Data/Polonium.txt"
[t,N,dN] = loadtxt(filename, unpack=True)
xlabel("time [days]")
ylabel("$N$")
# Plot Data
errorbar(t, N, fmt='o', label='Data', yerr=dN)

So what’s going on ?

We’ve already seen every single one of these commands in the previous exercises; if something seems unfamiliar, go back and check. Make sure you understand what each line does.

Solutions to exercise 6

comments powered by Disqus