Topic
How to multiply x axis by constant?
Startseite ' Community ' Allgemein ' How to multiply x axis by constant?
- Dieses Thema hat 4 Antworten sowie 2 Teilnehmer und wurde zuletzt vor vor 16 Jahren von Richard Smith aktualisiert.
-
AutorBeiträge
-
27.04.2009 um 23:34 Uhr #33832Richard SmithTeilnehmer
If I create a function where I multiply a signal dataset by a constant this multiplies the Y axis values.
How to I do the same but multiply only the X axis (for instance time) values?
Thanks.
27.04.2009 um 23:34 Uhr #33836Richard SmithTeilnehmerIf I create a function where I multiply a signal dataset by a constant this multiplies the Y axis values.
How to I do the same but multiply only the X axis (for instance time) values?
Thanks.
27.04.2009 um 23:39 Uhr #33833Bernhard KantzTeilnehmerUse the following FPScript code:
[code]
Dim factor = 2.0
Signal(data.Y, data.X * factor)
[/code]In this example [b]data[/b] is the signal name.
28.04.2009 um 00:29 Uhr #33834Richard SmithTeilnehmerThanks for the reply.
I tried this solution and it works perfectly, however, I am wondering what the “Dim factor = 2.0” does because also just tried “Signal(signalname.Y, signalname.X * factor” by itself that also works perfectly.
Thanks.
28.04.2009 um 00:45 Uhr #33835Bernhard KantzTeilnehmerBoth notations are possible. The Dim statement declares a local variables and assigns a value to it. But you’re right. In this simple example you don’t need to use this variable.
-
AutorBeiträge
- Du musst angemeldet sein, um auf dieses Thema antworten zu können.