MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Learn moreOpportunities for recent engineering grads.
Apply TodayMATLAB Central > MATLAB Newsreader > vector and index 

I have a column vector with ones and zeros e.g. b=[0 0 1 1 1 0 0 1]. 

"Konst " <konstance1@hotmail.com> wrote in message <iklq14$esm$1@fred.mathworks.com>... 
I tried it but it always returns k=0...Can't figure out why..Thanks though Bruno! 
"Konst " <konstance1@hotmail.com> wrote in message <ikm835$2eg$1@fred.mathworks.com>... 
"Konst " <konstance1@hotmail.com> wrote in message <iklq14$esm$1@fred.mathworks.com>... 
"someone" wrote in message <ikmalk$ijm$1@fred.mathworks.com>... 
"Konst " <konstance1@hotmail.com> wrote in message 
No tags are associated with this thread.
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.