Message Boards Message Boards

0
|
15671 Views
|
15 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Define functions for variables with units?

Units are important in engineering and science, so I need to get my students to be religious about using them. I provide answers to homework and exams using Mathematica. Incorporating units in simple computations is relatively easy, but I have difficulty in using units with functions. For example how do I define a function

d[t_]:=10*t^2 + 5*t+25

where the units of t are seconds? In subsequent calls of the function, do I need to use the Quantity notation for every specific numeric value of t?

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract

Be respectful. Review our Community Guidelines to understand your role and responsibilities. Community Terms of Use