Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a data table from a function defined in Mathcad 1

Status
Not open for further replies.

cabomhn

Nuclear
Sep 11, 2014
2
US
Ok so just a little background, I'm using Mathcad Prime 3.0 for my calculations. So lets say I have a function defined as f(x) in mathcad and I am able to graph it appropriately. Is it possible to have Mathcad produce a tables of values f(x) for a range of x from say 0 to 12, in increments of 0.1.

I know this has to be something fairly simple to do but I have looked online for a while and haven't found anything that would allow me to do this. Thanks for any help!
 
Replies continue below

Recommended for you

if you define x like x := 0,.1...12 and then f(x) = you will get a vector of the values that you want. If you also want more values of x available, you can define a separate range as above, say xx, and then f(xx) would give you that specific range without altering more results.
 
Thanks a lot that's exactly what I need. Makes a lot of sense. Sorry for such a simple question just starting learning the basics of Mathcad. I appreciate the quick response.
 
Just be aware that an array variable is not exactly like a vector, i.e., you can't do transposes, etc.

An alternate approach is to use an indexed variable, which will behave like a vector:

i : 0;120
x[i : (i/10)

This will also allow you to do g[i : f(x[i) or f(x[i, y[j) type of problems

TTFN
faq731-376
7ofakss

Need help writing a question or understanding a reply? forum1529

Of course I can. I can do anything. I can do absolutely anything. I'm an expert!
 
Status
Not open for further replies.
Back
Top