Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
Hello everyone,
I am trying to convert an old calculation file (in PDF format) to the latest version of Mathcad Prime. There are a few functions that I don't fully understand. I am attaching the PDF and the Mathcad Prime file for reference. Any help is appreciated. Thank you!
Solved! Go to Solution.
Any reason for preferring interpolation rather than using the equations given at the bottom of the table?
Should lambda be unitless?
Mathcad Prime 11 worksheet attached.
Stuart
There are a couple of things I don't understand, either. In particular, what is in the collapsed Area in Step 8? Could you post the original SMath worksheet?
I'm guessing that the SMath worksheet uses a 1-based ORIGIN, so a couple of the problems can be corrected by adjusting the indices to use your 0 ORIGIN.
Stuart
Thank you for your clear explanation. Unfortunately, I don't have source file available atm. But I do have a table (see attachment) from where Mt value comes from. This function must be implemented in Mathcad as an interpolation between the tabulated values from the table. Thank you
Any reason for preferring interpolation rather than using the equations given at the bottom of the table?
Should lambda be unitless?
Mathcad Prime 11 worksheet attached.
Stuart
Not any specific reason and yes Lambda should be unitless. Thank you soo much!
No worries,
Stuart
The original program from which the PDF originated was not an old Mathcad version, but the free SMath—hence the syntax differences.
The pdf seems to b created yesterday, so I assume you have access to the original sm file and the SMath Program anyway?
Here are the first few errors I noticed:
1) A typo when entering the matrix LML
2) Another typo when defining the matrix CTP_L (where only the third column is changed compared to LML)
3) Incorrect column indices when defining the interpolation function
4) 2D graphics differ significantly between SMath and Prime. In Prime, the independent variable (x) must be entered on the abscissa, and the function to be displayed on an ordinate placeholder (by default on the right, but can be moved to a few other positions).
If you use the Quickplot feature in Prime, i.e., you do not define a range variable for the abscissa values x, Prime selects the range from -10 to 10. In this case, you must adjust the values manually in the graph. You can change the first, second, and last values manually on each axis.
Grid lines are not available in Prime's native plots. Either use one of the workarounds (plotting a grid as an additional trace) which where posted here in the forum from time to time, or you use Primes infamous Chart component.
You also could do without the interpolating function and simply plot the vectors.
The scale Prime choses automatically again can be overridden by editing the appropriate axis values
EDIT: Oops, had not seen Stuarts answer when I started my reply ...
@StuartBruff according the confusion of matrix CTP_L used as a function. SMath seems to allow the same name for a variable and a function and is able to distinguish between them depending on how they are used. Clever, but confusing.
In the pdf the interpolating function was also called CTP_L, so CTP_L is a matrix as well as a function. @engr_mkhalid seems to have known about this (or ran into errors when trying to use CTP_L as a matrix after it was defined as function) and used CTP_L_fun as the name for the function.
@Werner_E wrote:
@StuartBruff according the confusion of matrix CTP_L used as a function. SMath seems to allow the same name for a variable and a function and is able to distinguish between them depending on how they are used. Clever, but confusing.
In the pdf the interpolating function was also called CTP_L, so CTP_L is a matrix as well as a function. @engr_mkhalid seems to have known about this (or ran into errors when trying to use CTP_L as a matrix after it was defined as function) and used CTP_L_fun as the name for the function.
I'd guessed that might be the case; just plain old symbol overloading, but I left checking until the OP replied with the hidden definitions.
STuart