Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
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?
Solved! Go to Solution.
How about the attached? Note - you must end with a semi-colon.
Alan
Great, Alan! Thank you for your help!
Here is a different approach, for whatever its worth.
Main difference is that every character is allowed and taken as data (apart from the separators space, comma and semicolon).
If str2num() would throw an error, the appropriate string is put in the matrix.
If there are elements missing in a row, they are filled with zeros at the end.
Werner,
Thank you for modifed program.
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?
Getting the vector of ANSI codes from the input string (even if its assigned a function) is not that difficult
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.
As a result, I would like to get the converted function, which can then be used in a symbolic calculation. Like this:
VladimirN. wrote:
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?
Mathcad Server
Thank you, Valery.
VladimirN. wrote:
Thank you, Valery.
You welcome!
Use please the cloud function too:
Not quite, but maybe this will work, depending on exactly what it is you are trying to do.
Richard,
Thank you for your help. The solution you have provided is elegant. In an attachment, you can find another way of solution. But obviously it works in version M11, but not in M15. This example is taken from Valery site, which he pointed out. But as a result, I would like to get the converted function, which can then be used in a symbolic calculation. Like this:
That's Tom's old expression compiler. Sorry, but it can't be made to work past version 11.
Because of the involved Maple symbolic engine?
A number of worksheets and methods developed in version 11 used unsupported "features" of the software. When they went to version 12 they changed the symbolic processor, rewrote the compute engine, introduced SUC, etc. They changed a lot, and a lot of the unsupported features disappeared, either by choice (for example backdoor access to unsupported Maple functions, certain ways to use symbolics in programs), or by simple omission because they were unsupported. At the same time, a number of supported features also disappeared, either by design or by omission. A number of very useful worksheets no longer worked. Many of them still do not work in any later version, and proabaly never will. That's one of them.
In Prime:
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