Try:
flow1 = sum(1/3*GEN[1:3,"basel"] .- 1/3*GEN[1:3,"bern"])
You want element-wise subtraction, so you need .- instead of -.
Try:
flow1 = sum(1/3*GEN[1:3,"basel"] .- 1/3*GEN[1:3,"bern"])
You want element-wise subtraction, so you need .- instead of -.