Page 1 of 1

a question on Assignment Operator (=)

Posted: Sun Nov 01, 2020 7:07 am
by hardmann
Dear Tom:

In RATS User’s Guide UG–5, last instrcution as follows

Code: Select all

compute y(1)=y(2)=y(3)=0.0
set zhat = (x2(t)=z2/y2) , x2 * v2/y2 
*X2, V2, Y2, and Z2 are series
This second example at entry T first computes X2(T), then uses that to compute the
value of ZHAT, which will be X2(T)*Y2(T)/Y2(T).

I do not understand the code. Why It not be directly written as follow:

Code: Select all

set zhat = (z2/y2) * v2/y2

Re: a question on Assignment Operator (=)

Posted: Sun Nov 01, 2020 7:28 am
by TomDoan
If you also need the X2 series, you can do it in one go.

Re: a question on Assignment Operator (=)

Posted: Wed Nov 04, 2020 6:10 pm
by hardmann
Dear Tom
if cancelling t from x2(t), what is different?
set zhat = (x2=z2/y2) , x2 * v2/y2

Re: a question on Assignment Operator (=)

Posted: Wed Nov 04, 2020 9:07 pm
by TomDoan
Nothing. Including the T just makes it clearer that it's going into a series.