vector multiplied a matrix
2 ビュー (過去 30 日間)
Hi, I need this multiplication and I can't whats wrong
where c and T are the attached files.
so I expect a raw vector f where:
f_11 = c_11*T_11 + c_12*T_21 + c_13*T_31 + c_14*T_41 + c_15*T_51;
f_12= c_11*T_12 + c_12*T_22 + c_13*T_32 + c_14*T_42 + c_15*T_52;
and so on.
It's really stupid i know, but I can''t figured out why it's not working.
c has 1 colum and 5 rows, T has 101 colums and 5 rows.
その他の回答 (1 件)
the cyclist 2020 年 6 月 11 日
If your version of MATLAB is older than R2016b, then c will not be "implicitly expanded" to the size of T. You can do the following to get what you want:
f = bsxfun(@times,c,T)