a = [0.9 0.8 0.7 0.6 0.5];
b = [0.1 0.2 0.3 0.4 0.5];
t = ff2n(n);
t1 = t.*a
t1 =
0 0 0 0 0
0 0 0 0 0.5000
0 0 0 0.6000 0
0 0 0 0.6000 0.5000
0 0 0.7000 0 0
0 0 0.7000 0 0.5000
0 0 0.7000 0.6000 0
0 0 0.7000 0.6000 0.5000
0 0.8000 0 0 0
0 0.8000 0 0 0.5000
0 0.8000 0 0.6000 0
0 0.8000 0 0.6000 0.5000
0 0.8000 0.7000 0 0
0 0.8000 0.7000 0 0.5000
0 0.8000 0.7000 0.6000 0
0 0.8000 0.7000 0.6000 0.5000
0.9000 0 0 0 0
0.9000 0 0 0 0.5000
0.9000 0 0 0.6000 0
0.9000 0 0 0.6000 0.5000
0.9000 0 0.7000 0 0
0.9000 0 0.7000 0 0.5000
0.9000 0 0.7000 0.6000 0
0.9000 0 0.7000 0.6000 0.5000
0.9000 0.8000 0 0 0
0.9000 0.8000 0 0 0.5000
0.9000 0.8000 0 0.6000 0
0.9000 0.8000 0 0.6000 0.5000
0.9000 0.8000 0.7000 0 0
0.9000 0.8000 0.7000 0 0.5000
0.9000 0.8000 0.7000 0.6000 0
0.9000 0.8000 0.7000 0.6000 0.5000
t2 = not(t.*a).*b
t2 =
0.1000 0.2000 0.3000 0.4000 0.5000
0.1000 0.2000 0.3000 0.4000 0
0.1000 0.2000 0.3000 0 0.5000
0.1000 0.2000 0.3000 0 0
0.1000 0.2000 0 0.4000 0.5000
0.1000 0.2000 0 0.4000 0
0.1000 0.2000 0 0 0.5000
0.1000 0.2000 0 0 0
0.1000 0 0.3000 0.4000 0.5000
0.1000 0 0.3000 0.4000 0
0.1000 0 0.3000 0 0.5000
0.1000 0 0.3000 0 0
0.1000 0 0 0.4000 0.5000
0.1000 0 0 0.4000 0
0.1000 0 0 0 0.5000
0.1000 0 0 0 0
0 0.2000 0.3000 0.4000 0.5000
0 0.2000 0.3000 0.4000 0
0 0.2000 0.3000 0 0.5000
0 0.2000 0.3000 0 0
0 0.2000 0 0.4000 0.5000
0 0.2000 0 0.4000 0
0 0.2000 0 0 0.5000
0 0.2000 0 0 0
0 0 0.3000 0.4000 0.5000
0 0 0.3000 0.4000 0
0 0 0.3000 0 0.5000
0 0 0.3000 0 0
0 0 0 0.4000 0.5000
0 0 0 0.4000 0
0 0 0 0 0.5000
0 0 0 0 0
t1+t2
ans =
0.1000 0.2000 0.3000 0.4000 0.5000
0.1000 0.2000 0.3000 0.4000 0.5000
0.1000 0.2000 0.3000 0.6000 0.5000
0.1000 0.2000 0.3000 0.6000 0.5000
0.1000 0.2000 0.7000 0.4000 0.5000
0.1000 0.2000 0.7000 0.4000 0.5000
0.1000 0.2000 0.7000 0.6000 0.5000
0.1000 0.2000 0.7000 0.6000 0.5000
0.1000 0.8000 0.3000 0.4000 0.5000
0.1000 0.8000 0.3000 0.4000 0.5000
0.1000 0.8000 0.3000 0.6000 0.5000
0.1000 0.8000 0.3000 0.6000 0.5000
0.1000 0.8000 0.7000 0.4000 0.5000
0.1000 0.8000 0.7000 0.4000 0.5000
0.1000 0.8000 0.7000 0.6000 0.5000
0.1000 0.8000 0.7000 0.6000 0.5000
0.9000 0.2000 0.3000 0.4000 0.5000
0.9000 0.2000 0.3000 0.4000 0.5000
0.9000 0.2000 0.3000 0.6000 0.5000
0.9000 0.2000 0.3000 0.6000 0.5000
0.9000 0.2000 0.7000 0.4000 0.5000
0.9000 0.2000 0.7000 0.4000 0.5000
0.9000 0.2000 0.7000 0.6000 0.5000
0.9000 0.2000 0.7000 0.6000 0.5000
0.9000 0.8000 0.3000 0.4000 0.5000
0.9000 0.8000 0.3000 0.4000 0.5000
0.9000 0.8000 0.3000 0.6000 0.5000
0.9000 0.8000 0.3000 0.6000 0.5000
0.9000 0.8000 0.7000 0.4000 0.5000
0.9000 0.8000 0.7000 0.4000 0.5000
0.9000 0.8000 0.7000 0.6000 0.5000
0.9000 0.8000 0.7000 0.6000 0.5000
Best Answer