[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Octave's and Matlab's limitations
From: |
Kjetil brinchmann Halvorsen |
Subject: |
Re: Octave's and Matlab's limitations |
Date: |
Thu, 22 Nov 2012 14:03:18 -0300 |
see inline.
On Thu, Nov 22, 2012 at 1:01 PM, Francesco Potortì <address@hidden> wrote:
>>> 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.
R is a functional language, the language itself is built from
functions, not from syntax as in non-functional languages. So to say
"Well, this is done using functions, it is not a feature of the
language itself. " doesn't really makes sense for R. The point is
that this has been a part of the language from befor matlab even
existed. It might be that matlab's version is marginally more
expressive (really shorter, or marginally more readable), but then in
R, as a functional language, it is possible to extend
the syntax by user functions, even extending this syntax to new kinds
of objects, simply by defining new replacements functions. So R's
version is probably more adaptive, flexible than matlab's.
Kjetil
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
--
"If you want a picture of the future - imagine a boot stamping on the
human face - forever."
George Orwell (1984)
- Re: Octave's and Matlab's limitations, (continued)
- Re: Octave's and Matlab's limitations, Jordi Gutiérrez Hermoso, 2012/11/22
- Re: Octave's and Matlab's limitations, Francesco Potortì, 2012/11/22
- Re: Octave's and Matlab's limitations, Salva Ardid, 2012/11/22
- Re: Octave's and Matlab's limitations, Jordi Gutiérrez Hermoso, 2012/11/22
- Re: Octave's and Matlab's limitations, Sergei Steshenko, 2012/11/22
- Re: Octave's and Matlab's limitations, Kjetil brinchmann Halvorsen, 2012/11/22
- Re: Octave's and Matlab's limitations, Francesco Potortì, 2012/11/22
- Re: Octave's and Matlab's limitations, Freddy López, 2012/11/22
- Re: Octave's and Matlab's limitations, Francesco Potortì, 2012/11/22
- Re: Octave's and Matlab's limitations, Martin Helm, 2012/11/22
- Re: Octave's and Matlab's limitations,
Kjetil brinchmann Halvorsen <=
- Re: Octave's and Matlab's limitations, Sergei Steshenko, 2012/11/22
- Re: Octave's and Matlab's limitations, Dimitri Maziuk, 2012/11/21
- Re: Octave's and Matlab's limitations, c., 2012/11/21
- Re: Octave's and Matlab's limitations, Dimitri Maziuk, 2012/11/21
- Re: Octave's and Matlab's limitations, Jordi Gutiérrez Hermoso, 2012/11/21
- Re: Octave's and Matlab's limitations, Dimitri Maziuk, 2012/11/21
- Re: Octave's and Matlab's limitations, Sergei Steshenko, 2012/11/21
- Re: Octave's and Matlab's limitations, Salva Ardid, 2012/11/21
- Re: Octave's and Matlab's limitations, Francesco Potortì, 2012/11/21