Skip to main content
24-Ruby IV
May 21, 2013
Solved

Creating a matrix by using "Text Box" control

  • May 21, 2013
  • 17 replies
  • 8739 views

Hi,

I want to create the initial matrix by using a "Text Box" control. In an attachment you can find an example of creating a column vector. Is it possible to correct the program (using the separator character ";" [or may be other] for the rows) for creating matrix with "m*n" size?

Pic_1.png

Best answer by AlanStevens

How about the attached? Note - you must end with a semi-colon.

Alan

mn.PNG

17 replies

19-Tanzanite
May 21, 2013

How about the attached? Note - you must end with a semi-colon.

Alan

mn.PNG

VladimirN24-Ruby IVAuthor
24-Ruby IV
May 21, 2013

Great, Alan! Thank you for your help!

VladimirN24-Ruby IVAuthor
24-Ruby IV
May 21, 2013

Is it possible to implement the transformation (from string into a function f(x)) of input function f(x) in the "Text Box" control field?

Pic_2.png

Werner_E
25-Diamond I
May 21, 2013

Getting the vector of ANSI codes from the input string (even if its assigned a function) is not that difficult

strvec.png

but creating a real function (your N() is a function which returns the same definition string for every argument) is sure not easy if possible at all.

Ther may be a feasible way of doing it using a scripted component while I don't know if we have access to expression from the script as we have to worksheet variables - I'm not well versed in scripting but maybe there is a way of creating a dummy function in the sheet rfirst, then the script can find that region and modofies the XML appropriately. In any case out of my reach. Doing it in pure Mathcad would require writing you own parser. This would be quite slow, I guess, and would be executed for every argument the function is called for - will slow down plotting significantly.

VladimirN24-Ruby IVAuthor
24-Ruby IV
May 22, 2013

As a result, I would like to get the converted function, which can then be used in a symbolic calculation. Like this:

Pic_3.png

24-Ruby IV
May 21, 2013

VladimirN. wrote:

Hi,

I want to create the initial matrix by using a "Text Box" control. In an attachment you can find an example of creating a column vector. Is it possible to correct the program (using the separator character ";" [or may be other] for the rows) for creating matrix with "m*n" size?

Mathcad Server

http://twtmas.mpei.ac.ru/mas/worksheets/lsolve.mcd