I am writing a mata code to multiply two matirx, the code is as follow
M=st_view(.,.,"s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 s41 s42 s43 s44 s45 s46 s47 s48 s49 s50 s51 s52 s53 s54 s55 s56 s57 s58 s59 s60 s61 s62 s63 s64 s65")
O=(1::65)
O=st_view(.,.,"s_omega")
T=(1::249796)
T=M*O
st_store(.,st_addvar("float","ea"),T)
end
s1 represents a column vector, s1: 249796 x 1
and (s1 s2 ...s65): 249796 x 65
s_omega also represents a column vector, s_omega: 65 x 1
and I want to get the column vector T, T: 249796 x 1
Though I have read several mata manuals, but I'm confusing about what is causing the error.
Thank you!
Alice
M=st_view(.,.,"s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 s41 s42 s43 s44 s45 s46 s47 s48 s49 s50 s51 s52 s53 s54 s55 s56 s57 s58 s59 s60 s61 s62 s63 s64 s65")
O=(1::65)
O=st_view(.,.,"s_omega")
T=(1::249796)
T=M*O
st_store(.,st_addvar("float","ea"),T)
end
s1 represents a column vector, s1: 249796 x 1
and (s1 s2 ...s65): 249796 x 65
s_omega also represents a column vector, s_omega: 65 x 1
and I want to get the column vector T, T: 249796 x 1
Though I have read several mata manuals, but I'm confusing about what is causing the error.
Thank you!
Alice
Comment