MATLAB: Multiply table and matrix

multiply

how can i multiply these example?
A= {[0.2 0.5 0.3] [ 0.1 0.1 0.3]}
A=cell2table(A)
B=[ 2 3]
A*B must be {[0.4 1 0.6] [0.3 0.3 0.9]}

Best Answer

I prefer Adam's method :
although if you want to multiply table with matrix then=>
arrayfun(@(x) A{:,x}*B(x),1:numel(B),'un',0)