help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Octave's and Matlab's limitations


From: Freddy López
Subject: Re: Octave's and Matlab's limitations
Date: Thu, 22 Nov 2012 11:20:42 -0430

 
Can S (or R) do something like the following?

A([1:2:97 98 99], 1:end-1) = 0;

 
Of course. An example:

A=matrix(rnorm(100*100),100,100)
A[c(seq(1,97,2),98,99),c(1:(nrow(A)-1))]<-0

Cheers.

--
«But Gwindor answered: 'The doom lies in yourself, not in your name.'»

JRR Tolkien


reply via email to

[Prev in Thread] Current Thread [Next in Thread]