For Programmers: Free Programming Magazines  


Home > Archive > Matlab > July 2006 > Counters/Loops in Matlab









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Counters/Loops in Matlab
Tessa Anodide

2006-07-31, 7:17 pm

I have a series of for loops and within the innermost one, I am
sorting through an array to pull out some values (example: Thing =
[Thing_list(index).Item]) I need to keep a counter of Thing for each
iteration through the loop, but am not sure of how to go about doing
that.

Thanks,
Tessa
Robert McCormick

2006-07-31, 10:02 pm

Tessa Anodide wrote:
>
>
> I have a series of for loops and within the innermost one, I am
> sorting through an array to pull out some values (example: Thing =
> [Thing_list(index).Item]) I need to keep a counter of Thing for
> each
> iteration through the loop, but am not sure of how to go about
> doing
> that.
>
> Thanks,
> Tessa


within your for loop have a command count = count +1
though you will need to have a count = 0 outside of the loop

Robert
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com