cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

need help with piecewise function

amedy?ski
1-Visitor

need help with piecewise function

hey could someone help me with this ? i need to putt this function into mathcad prime 3.1 and i have no idea how to do it. help

7 REPLIES 7

See please the attach too

RichardJ
19-Tanzanite
(To:amedy?ski)

Use if...else in programming, as Valery shows. You can simplify the expression you show. In the first line t must be less than 123, in which case it can not be greater than 124. So you have three cases:

t < 123

123 < t < 124

t >= 124

Note that you are missing the case for t=123.

hey, i need to write a function like this, i dont know how to write 3 variables of t. can someone help me.pomocy.png

RichardJ
19-Tanzanite
(To:amedy?ski)

You need a return statement to make the program return a value and then exit:

Or you could assign the values to a variable, and put the variable on the last line:

thank you very much.
i have another question. what if i would like to do plot with FTOT(t) and t (from 1 to 1000) ?

RichardJ
19-Tanzanite
(To:amedy?ski)

Create a range variable from 1 to 1000, put the range variable on the x-axis, and FTOT(range variable) on the y-axis.

I suggest you go through the tutorials. It wouldn't take long, and it would answer most of these basic questions for you.

i figured it out but thanks. but i need help with differential equation. so far i have something like this(mathcad file) a have to do something like this(screenshoot). i wolud appreciate any help. i also made a post i physics section.

Announcements

Top Tags