Step 3:
clear;W1=rand(4,2); %assign random weights to connections between input and hidden layers
W2=rand(1,4); %assign random weights to connections between hidden and output layers
for epoch=1:10000 %start training the network
What should go in here? See next step.
end; %for epoch