1 2 3 4 5 6 7 8 9 10
//chapter 31 Ex 1 clc; clear; close; S={'H','T'}; E={'H'}; sizeS=size(S,"c"); sizeE=size(E,"c"); prob=sizeE/sizeS; printf("The probability of getting a head is %0.2f",prob);