Actually, a slight modification. The way I wrote it, it will compute the 
product of all matrices with all vectors (pxp mults), which is not what you 
want. You just want each matrix to multiply its respective vector (p 
mults). The solution to that is:

p = length(matlist)
reduce(+, [matlist[i]*veclist[i] for i = 1:p])

On Monday, June 23, 2014 2:43:32 AM UTC+12, Michiaki Ariga wrote:
>
> Hi all,
>
> I'm a Julia newbee, and I'm trying to learn Julia and wrote Julia version 
> of rougier's 100 numpy exercises(
> http://www.loria.fr/~rougier/teaching/numpy.100/index.html).
>
> https://github.com/chezou/julia-100-exercises
>
> I'd like you to tell me more "julia way" or something wrong with.
>
> Best regards,
> Michiaki
>

Reply via email to