A series order question
Hi all experts
Hope you could do me a favor.
How could i express the following series order with programing function?
Tks
Ton is the constant value and Toff(t) is variable by having different "duration" Ton, Ton+T1, Ton+T1+T2

Hi all experts
Hope you could do me a favor.
How could i express the following series order with programing function?
Tks
Ton is the constant value and Toff(t) is variable by having different "duration" Ton, Ton+T1, Ton+T1+T2

You may try a recursive approach either using he if-function

or the if-statement

And here is a non-recursive approach which should be more efficient for larger values of n

We can get rid of the local variable Rlast but have to treat n=1 as a special case and so have to use an if-statement

We can also hide that if-statement using a boolean factor

Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.