For your simple example, you can use conv
c=conv(a,b)
however for your actual case it will be more complicated. You could repeatedly conv
vectors like so (if your a
vectors are rows of A
)
A=a(1,:);
for i=2:30
A=conv(A,a(i,:));
end
(Note: This code works but I am not sure whether it will give you the correct results---this is not a topic I know much about, so be careful!)