Hey Everybody,

I'm quite new to KNIME and have a question about how to loop through a column. Well I have data which I read from a csv-file. Each of my rows represents one second. In column 8 I have values which are either 1 or 0. Now i want to loop through this column and want to count the number of 1s until a 0 apperars. Then I want to start counting at 0 again. The result for each row should be added as a new column.

I'm used to work with Matlab,so my Matlabscribt would look somehow like this:

*for m=1:table.length*

*if table(m,8)= 1*

*count(m)=count+1;*

*elseif table(m,8)=0*

*count(m)=0;*

*end*

*table(:,9)=count;*

table represents my data table and count is the vector I add as new column.

My ideas to implement this with KNIME would be to use a Java Snippet or maybe some loop, but I don't really know how to do it. So I appreciate any help!

Regards, Daja