[Scilab-users] Peaks and positions

Samuel Gougeon sgougeon at free.fr
Mon Jan 28 23:03:45 CET 2013


Le 28/01/2013 22:30, Berns Buenaobra a écrit :
> Hi Samuel:
>
> I'd like to understand  the "$" inside the would mean from the script?
This is the size of the object along the related direction:
http://help.scilab.org/docs/5.4.0/en_US/dollar.html

after
a = ones(7,3)
a(:,$)     // is equivalent to a(:,3)
a($-2,:)  // is equivalent to a(5,:)

$ can be used for any type of object: lists, structures, cells,
and obviously matrices and hypermatrices:

L = list("Hello", %pi, (%z-1)^2)
L($)  // returns the polynomial (%z-1)^2 = the last element of L
// To append a element to L, just use(for instance)
L($+1) = %T

$ can also be seen as a measurement of the money that you save when
using Scilab. But this is another undocumented story ;)

Samuel



More information about the users mailing list