Skip to main content
1-Visitor
January 15, 2016
Question

need help with piecewise function

  • January 15, 2016
  • 5 replies
  • 5298 views

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

5 replies

24-Ruby IV
January 16, 2016

See please the attach too

19-Tanzanite
January 16, 2016

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.

amedy?ski1-VisitorAuthor
1-Visitor
January 17, 2016

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

19-Tanzanite
January 17, 2016

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:

amedy?ski1-VisitorAuthor
1-Visitor
January 17, 2016

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) ?

19-Tanzanite
January 18, 2016

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.

amedy?ski1-VisitorAuthor
1-Visitor
January 18, 2016

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.