[R] Compute z

Michael Dewey lists at dewey.myzen.co.uk
Sun Jul 26 17:00:08 CEST 2015


Dear Hal

Are you looking for %*% by any chance?

On 26/07/2015 09:38, admin.dslcomputer at gmail.com wrote:
> Hi Everyone:
>
>
> How do I correctly compute z?
>
>
>
> z = 0;
> for i = 1:7
>    z = z + v(i) * w(i)
> end
>
>
> If there are two column vectors v and w, each with 7 elements (i.e., they have dimensions 7x1).
>
>
> Regards,
>
> Hal
>
>
>
>
>
>
> Sent from Surface
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
Michael
http://www.dewey.myzen.co.uk/home.html



More information about the R-help mailing list