A parte il fatto che, secondo me, il tuo prof. non ha le idee molto chiare sui prodotti matriciali... io risolverei così:
clear
clc
n_max=3;
A=rand(n_max,n_max);
B=rand(n_max,n_max);
tic
for i=1: (n_max-1),
A( :,i ).*B( :,i ); % per colonne
end
tempo1=toc
for i=1: (n_max-1),
A( i,: ).*B( 1,: ); % per righe
end
tempo2=toc
ciao