[Scilab-users] please help, I have just a mental blockade

Claus Futtrup cfuttrup at gmail.com
Mon Feb 7 20:28:27 CET 2022


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 at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users





More information about the users mailing list