From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW MathScript RT Module

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you do a linear piecewise function in MathScript?

how do i graph a linear piecewise fuction of time in mathscript.  Im trying to create a  force vs time graph that from t=0 to t=5 (seconds) is the function y=x, when t=5 to t=10  the function is y=5 and from t=10 to t=15, the function is y = -x.

0 Kudos
Message 1 of 2
(6,451 Views)

Hi r.wilcox,

 

I created a simple piecewise function in MathScript (using LV 2013) containing your 3 functions and their respective ranges. Hopefully this will get you started.

 

 

Aldo A
Applications Engineer
National Instruments
Message 2 of 2
(6,394 Views)