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: Francesco Potortì
Subject: Re: Octave's and Matlab's limitations
Date: Thu, 22 Nov 2012 17:01:01 +0100

>>  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

Well, this is done using functions, it is not a feature of the language
itself.  It definitely makes sense to speak of the Matlab indexing
notation, which is a more powerful evolution of the S notation and, in
my opinion, is the killing feature of Matlab/Octave (and apparently of Julia).

-- 
Francesco Potortì (ricercatore)        Voice:  +39.050.315.3058 (op.2111)
ISTI - Area della ricerca CNR          Mobile: +39.348.8283.107
via G. Moruzzi 1, I-56124 Pisa         Skype:  wnlabisti
(entrance 20, 1st floor, room C71)     Web:    http://fly.isti.cnr.it


reply via email to

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