cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Returning a symbolic matrix from a Custom Function

waverectifier
4-Participant

Returning a symbolic matrix from a Custom Function

I want to do a custom function that receives a file name, and reads a matrix of symbolics, and return this symbolic matrix do Mathcad.  For example, my file may contain the following 3x3 matrix:

 

a                        b+c8           k/e3

0                        5+f4            0

(6*a)/(b+c)        0                 1

 

numbers are numbers, symbols are k, a, e3, c8, etc.

 

Anyone knows how to do it?

1 ACCEPTED SOLUTION

Accepted Solutions
LucMeekes
23-Emerald III
(To:waverectifier)

You're not the first to ask, and probably not the last either.

Consider this function:

LM_20190310_SymbolMatrix.png

As you can see, it is possible in Mathcad,

BUT... you need Mathcad 11.

It is the only version that has a sufficiently large undocumented access to its symbolic processor, allowing the String2Expression() function to operate by its name.

 

Luc

View solution in original post

2 REPLIES 2

I guess that you are out of luck and that its not possible to achieve in Mathcad what you are asking for.

What you read in from a file would be a text and it would be necessary to create variable names based on that text. Unfortunately we cannot create variable names in Mathcad other than typing them in manually.

LucMeekes
23-Emerald III
(To:waverectifier)

You're not the first to ask, and probably not the last either.

Consider this function:

LM_20190310_SymbolMatrix.png

As you can see, it is possible in Mathcad,

BUT... you need Mathcad 11.

It is the only version that has a sufficiently large undocumented access to its symbolic processor, allowing the String2Expression() function to operate by its name.

 

Luc

Top Tags