Hi Samuel, and all Scilabers

Entertaining response from Samuel!

It's about knowing that the cumsum function exist. :-)

I googled Scilab cumsum and found old docs that it was part of elementary matrix operations (https://help.scilab.org/doc/6.0.0/en_US/cumsum.html), but in Scilab 6.1.1 this is part of a XCOS matrix palette.

Hmm.

The documentation for cumsum is now found under XCOS. What is the motivation behind this choice?

I wonder if this could be confusing - making us believe the module requires XCOS to be running.

Cheers,
Claus

On 07-02-2022 20:17, Samuel Gougeon wrote:
Hello Heinz,

Le 07/02/2022 à 18:35, Heinz Nabielek a écrit :
Sorry, colleagues  -   please help, I have just a mental blockade.

Given vector EE= [3 5 8]

I want to create a stepwise increasing vector E= [0 0 1 1 2 2 2 3 3 3 3]

And would need a system that works for much larger numbers....

Probably dead easy?


--> v = zeros(1,15);
--> v([3 5 8]) = 1;
--> cumsum(v)
 ans  =
   0.   0.   1.   1.   2.   2.   2.   3.   3.   3.   3.   3. 3. 3.   3.


HTH
Samuel

_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

Reply via email to