FlexPro
HistoryBase
Engineering
Training
Downloads
FlexPro-Support
Wissen
Community
Über Uns
Referenzen
Jobs
Allgemeiner Kontakt
Händlerverzeichnis
FlexPro-Support
DE
EN
FR
Placeholder
Produkte und Lösungen
Support und Downloads
Unternehmen
Magazin
Kontakt
Sprache
MyWeisang

Account Einstellungen

Topic

How to multiply x axis by constant?

Startseite ' Community ' Allgemein ' How to multiply x axis by constant?

Anzeigen von 5-Stellen - 1 bis 5 (von insgesamt 5)
  • Autor
    Beiträge
  • #33832
    Richard Smith
    Teilnehmer

    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.

    #33836
    Richard Smith
    Teilnehmer

    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.

    #33833
    Bernhard Kantz
    Teilnehmer

    Use 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.

    support@weisang.com

    #33834
    Richard Smith
    Teilnehmer

    Thanks 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.

    #33835
    Bernhard Kantz
    Teilnehmer

    Both 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.

    support@weisang.com

Anzeigen von 5-Stellen - 1 bis 5 (von insgesamt 5)
  • Du musst angemeldet sein, um auf dieses Thema antworten zu können.