```Hallo Claus,

would you like to explain, why you thought of images as input?

I worked a little in the field of finding lines/edges in noisy images and a
cumsum approach crossed my way some years ago.
So maybe here, there is something to learn for me?

Best Regards,
Philipp

Am Mo., 7. Feb. 2022 um 20:18 Uhr schrieb Claus Futtrup :

> Hi Heinz
>
> I notice that the E-vector is longer than the largest numberin the
> EE-vector. What decides the length of the E-vector?
>
> I was thinking length(EE) = 3 gives the highest number in the E-vector,
> and that e.g. max(EE) = 8 would be the length of the E-vector (but it's
> not ...), such that E = zeros(1:maxE) could be your initialization. This
> is why I ask, what decides the length of the E-vector?
>
> How large are the numbers going to be? ... are we talking
> graphics/pictures in the mega-pixel range as input?
>
> Best regards,
> Claus
>
> On 07-02-2022 18:35, Heinz Nabielek wrote:
> >
> > 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
> >
> > Heinz
> >
> > ___
> > 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
>
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

```

```
Le 07/02/2022 à 20:28, Claus Futtrup a écrit :

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?

It's an error in the 6.1.1 online doc (likely occuring during its recent
regeneration (mid december) after its truncation
,
while CUMSUM and cumsum are homonymous).

https://help.scilab.org/docs/6.1.0/en_US/cumsum.html  is OK
--> help cumsum // as well

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

```

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

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

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

```

```

Heinz,

It isn't clear what you need, I don't underastand the relationship
between EE and E.

Except for the first 0 in E, it seems that each consecutive number n is
repeated n+1 times up to the number indicated by the first component of
EE. Is this what you are looking for?

This is a simple (though not very efficient) way of attaining that:

m = EE(1);
E = []; //or E = 0 if the first 0 is really needed
for k=0:m
E = [E, k*ones(1, k+1)];
end

Regards.

Federico Miyara

On 07/02/2022 14:35, Heinz Nabielek wrote:

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

Heinz

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

--
El software de antivirus Avast ha analizado este correo electrónico en busca de
virus.
https://www.avast.com/antivirus
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

```

```
Hi Heinz

I notice that the E-vector is longer than the largest numberin the
EE-vector. What decides the length of the E-vector?

I was thinking length(EE) = 3 gives the highest number in the E-vector,
and that e.g. max(EE) = 8 would be the length of the E-vector (but it's
not ...), such that E = zeros(1:maxE) could be your initialization. This
is why I ask, what decides the length of the E-vector?

How large are the numbers going to be? ... are we talking
graphics/pictures in the mega-pixel range as input?

Best regards,
Claus

On 07-02-2022 18:35, Heinz Nabielek wrote:

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

Heinz

___
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

```

```
Hello Heinz,

Le 07/02/2022 à 18:35, Heinz Nabielek a écrit :

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

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

```