On Fri, Nov 28, 2008 at 8:35 AM, Heidi Wong <[EMAIL PROTECTED]> wrote:
> a. Write a R function zerdiag.v1(m) using loop to output a square matrix
> whose diagonal elements are zero and the other elements are filled in by
> consecutive integers from 1 to m row-wise.
>
> For example,
> zerdiag.v1(6)
> a. Write a R function zerdiag.v1(m) using loop to output a square matrix
> whose diagonal elements are zero and the other elements are filled in by
> consecutive integers from 1 to m row-wise.
>
> For example,
> zerdiag.v1(6) = [0, 1, 2]
> [3, 0, 4]
>
a. Write a R function zerdiag.v1(m) using loop to output a square matrix
whose diagonal elements are zero and the other elements are filled in by
consecutive integers from 1 to m row-wise.
For example,
zerdiag.v1(6) = [0, 1, 2]
[3, 0, 4]
[5, 6,
3 matches
Mail list logo