vect1=c(10,20,40)
vect2=c(55,67,89,96,100)
A=array(c(vect1,vect2),dim=c(3,4,2))
print(A)
mat.A=A[,,1]
mat.B=A[,,2]
print(mat.A + mat.B)
print(mat.B - mat.A)

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: