Skip to content
Prev 278518 / 398503 Next

counting values with some conditions in a simulation

A) you need to reply-all to keep the discussion on the mailing list.

B) you need to post in plain text.

C) this has the arbitrary smell of homework. This is not a homework help line.

D) You are overwriting your accumulation variable "sumt" after each test. Since you are not handling this calculation in a vectorized manner, I suggest you use the "if ... else ... else" syntax to accomplish this. See the help for "if".
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.
Sl K <s.karmv at gmail.com> wrote:

            
Message-ID: <d3e252e2-9b9d-4e7b-8f45-6b92e330f139@email.android.com>
In-Reply-To: <CAFciP4UofOajxkgJZLxzTpBHkK9ZQNe9OKPqyb6yQnm8d0rF0w@mail.gmail.com>