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

Translate the entire conversation x

Functions Vector and Matrix - Alternatives to CreateSpace and C

StuartBruff
23-Emerald IV

Functions Vector and Matrix - Alternatives to CreateSpace and C

The Mathcad functions matrix, CreateSpace and CreateMesh have a few limitations that led me to create alternatives.

 

One set of limitations is that the x (& y) ordinates they use are restricted to being linearly spaced (unless using a mapping function in CreateSpace and CreateMesh).  This often proved a nuisance, so (way back in Mathsoft Mathcad v11), I wrote replacements for them that allowed me more control over the x & y coordinates.

 

Secondly, Mathcad doesn't have a vector counterpart to the function matrix. A simple enough thing to implement.

 

And, bringing us up to date, CreateSpace and CreateMesh are Premium functions in Mathcad Prime, thus unavailable for Mathcad Express.

 

With the latter in mind, and noting CreateSpace's use in a recent thread, I thought I'd cobble together a worksheet showing one possible Express implementation of the functions vector, matrix, Vector, and Matrix (the latter two being replacements for CreateSpace and CreateMesh, respectively).

 

In addition, over the years, I've found the (replicated) x & y matrices sufficiently useful to define a function that creates them from their respective vector definitions (I called it conform when writing the attached Mathcad Express 11 worksheet, because I couldn't, off the top of my head, recall the appropriate name for such a vector-to-matrix mapping). 

 

Straightforward Definitions:

 

2025 10 06 A.png

 

conform-based Matrix variant:

 

2025 10 06 B.png

 

I used more Express functions (see postscript) than are strictly necessary to keep the definitions within A4 narrow margins. 

 

Unfortunately, I don't currently have the time to optimise the definitions or make them shorter, so please feel free to do so.  In particular, I haven't allowed for the x & y input arguments being matrices. There are probably some errors in there too - unlike Zathras, I haven't covered all possibilities.

 

Stuart

 

Mathcad Express 11 worksheet

 

Mathcad Express function dependencies (in Area):

 

2025 10 06 C.png

0 REPLIES 0
Announcements

Top Tags