07-19-2023 09:08 AM
Hello,
I’m trying to generate an exponential function
u(t) = 6 exp^(t-2)
for a real time from 0 to 2 seconds
Can anyone help me
07-19-2023 10:40 AM
It's built in:
Palette -> Functions -> Mathematics -> Elementary -> Exponential -> exp
07-19-2023 01:11 PM
I'm sure you are also knowledgeable about For Loop (which "count" for you) and arithmetic functions which can turn the "index" (the little box with "i" in the lower left of the Loop) into a time as finely-divided as you choose. Do you also know that if you have a series of LabVIEW functions (such as an exponential times a constant + another constant) and bring the wire from the final output of the computation to the right-hand edge of a For Loop, it will form an "indexing tunnel" (a square with the tiny symbol [] inside it, suggesting an Array) and give you, on the outside of the For Loop (when it exits) an array of whatever you were computing inside the loop.
Wire this up to a Waveform chart to see if it looks exponential ...
Bob Schor
07-19-2023 01:21 PM
try Chat GPT
07-19-2023 01:29 PM
Create a linear ramp of x values start=-2, end=0, and the desired number of points using "ramp pattern", feed it through the exponential function and multiply by 6. No loop needed.
07-19-2023 02:38 PM
@altenbach wrote:
Create a linear ramp of x values start=-2, end=0, and the desired number of points using "ramp pattern", feed it through the exponential function and multiply by 6. No loop needed.
And it will fit on a postage stamp!
07-19-2023 03:47 PM
@billko wrote:
@altenbach wrote:
Create a linear ramp of x values start=-2, end=0, and the desired number of points using "ramp pattern", feed it through the exponential function and multiply by 6. No loop needed.
And it will fit on a postage stamp!
Maybe two postage stamps if we use nice labels and don't cramp the code too much. 😄