Custom Glyphs plugin (previously known as Functions' Extension) - Сообщения

- requirements: SMath Studio 0.97.5737 or later (previous versions may have different features);
- installation: SMath Studio: Tools > Plugins... > Online Gallery;
- documentation: Файл не найден. Файл не найден.;
- sources: SVN repository.
For older versions of SMath (prior to 0.97.5737) the password is: test
Documentation for those old versions is attached below:
FunctionsExtension_examples.sm (54 КиБ) скачан 177 раз(а).

I would mentioned once more that having so many functions from the growing number of plugins becomes more and more problematic in tracking them out (I just can imagine how problematic should be for Martin to keep up in making the Handbook up to date). The number of Function Categories should be increased because it is the first instance (Besides the Dynamic Assistance) when you can see what function you can use for the specific problem.
Regards,
Radovan
PS. By the way Davide, what happened with ICDF.t(), ICDF.ChiSquare() and ICDF.F() from Statistical Tools plugin? Fortunately, we can use distrib package in Maxima

PSS. Once more to note the possible problem when frequantly installing/updating plugins from the Gallery (see the picture). If this happened, the only way is to delete the extension folder, and to install all the plugins again - AFAIK
There is still quite something to do until we can symbolically integrate functions involving your operators. Maxima can do that only if the cases expand to sign() and abs() or possibly unitstep(). Perhaps we also could split the integrals appropriately at the interval limits and send the individual functions to Maxima.
The at() operator currently can handle just very special types of expressions. We could map it to the at() function in Maxima, see attachment. We did so with the det() function in the recent update (announcement to come)
WroteFortunately, we can use distrib package in Maxima
How about posting an example in the Maxima topic of the Samples subforum? Maybe, there are still usability issues which we could fix...
WrotePSS. Once more to note the possible problem when frequantly installing/updating plugins from the Gallery (see the picture). If this happened, the only way is to delete the extension folder, and to install all the plugins again - AFAIK
Normally it is sufficient to delete the most recently installed plugins. Usually I have to delete the Maxima and the TableRegion directories.
at.sm (7 КиБ) скачан 91 раз(а).
WroteI would mentioned once more that having so many functions from the growing number of plugins becomes more and more problematic in tracking them out (I just can imagine how problematic should be for Martin to keep up in making the Handbook up to date). The number of Function Categories should be increased because it is the first instance (Besides the Dynamic Assistance) when you can see what function you can use for the specific problem.
I know, maybe the Viacheslav proposal about namespaces will help...
WrotePS. By the way Davide, what happened with ICDF.t(), ICDF.ChiSquare() and ICDF.F() from Statistical Tools plugin? Fortunately, we can use distrib package in Maxima
I'm looking for numerical approximations


WrotePSS. Once more to note the possible problem when frequantly installing/updating plugins from the Gallery (see the picture). If this happened, the only way is to delete the extension folder, and to install all the plugins again - AFAIK
I've never experimented the error in your screenshot, in the other hand the plugin updates sometimes (2 times, as for now) causes me workspace's "red cross of death" scrolling up and down worksheets

WroteThere is still quite something to do until we can symbolically integrate functions involving your operators. Maxima can do that only if the cases expand to sign() and abs() or possibly unitstep(). Perhaps we also could split the integrals appropriately at the interval limits and send the individual functions to Maxima.
I see, I don't know how to fix this (because anyway I'm expecting the use of booleans in the conditions - see the screenshots)
WroteThe at() operator currently can handle just very special types of expressions. We could map it to the at() function in Maxima, see attachment. We did so with the det() function in the recent update (announcement to come)
I'd like to add a function to make working at(2) and at(3) (indipendently from the Maxima plugin), let me know what I can do...
You could use abs() instead of sign(), that might work as well.
From the maxima manual:
The symbols < <= >= and > represent less than, less than or equal, greater than or equal, and greater than, respectively. The names of these operators are "<" "<=" ">=" and ">", which may appear where the name of a function or operator is required.
These relational operators are all binary operators; constructs such as a < b < c are not recognized by Maxima.
Relational expressions are evaluated to Boolean values by the functions is, maybe, if, while, unless. They are not otherwise evaluated or simplified to Boolean values, although the arguments of relational expressions are evaluated (when evaluation is not otherwise prevented by quotation).
...
[MATH]Maxima(is(1<2))=true@#[/MATH]
I do not understand the expression sign(abs(x>0)). if x>0, then the boolean expression returns 1, otherwise 0. abs() does not change that, neither does sign().
In SMath you can replace a
The sign(abs(#)) was to reproduce the actual behavior of the symbolic cases(), that use any 0 value as 'false' and any not null value as 'true' (mainly to skip the preprocessing of the conditions and to avoid scaling factors)
Wrote
WroteFortunately, we can use distrib package in Maxima
How about posting an example in the Maxima topic of the Samples subforum? Maybe, there are still usability issues which we could fix...
Done
WroteWrote
WrotePS. By the way Davide, what happened with ICDF.t(), ICDF.ChiSquare() and ICDF.F() from Statistical Tools plugin? Fortunately, we can use distrib package in Maxima
I'm looking for numerical approximations, if someone knows about some resources to use
...
Davide, I would really like to help - but simply do not know how what is a common programming way of these functions in order to avoid the problematic numerical issues.
Regards,
Radovan
- at(2) and at(3) now are working functions
features:
* implicit equivalence needs a value for each variable, sorted alphabetically;
* with explicit equivalence (variable == value) the replacement could be limited to some unknowns or extended to anyone.
[edit] 1st post documentation updated


So I've planned to add something similar in this plugin; here's a screenshot of the undressed working function... I'm looking for a name, I've thinked to do(2) (because is fast to write - but this may be used hereafter for a do statement?) or maybe each(2)... if anyone has some better ideas about the name... b)
Best regards,
Davide

Regards,
Radovan
1. mapping functions or expressions to structures by element vec(expr)
- identify the variables in expression (without preprocessing
- get variable values (structures) from context
- iterate over the elements replacing the element values for the structure variable names in expr and building a result of the same structure as the variables.
This would require the variables in expression to be either of the same structure or scalars. You might relax that condition to variables being of identical length, if linear adressing is unique and well defined. Then you would return a vector of corresponding length.
I think, the right over-arrow just like in Mathcad would be appropriate, even if I'd rather like arrows, overbars or the like to be available as decorations for variable names.
This is essentally what your function do() does already, except that perhaps the function could find out by itself, which variable to iterate over.
2. Implicit loops to generate matrix or vector results. Input is the index equation or it's parts (result name, expression, index names). I failed to provide a working example, the definitions might illustrate, what I mean.
[MATH lang=eng]apply(res,expr,i1,i2):line(expr1:at(expr,sys(i1≡ii1,i2≡ii2,2,1)),for(ii1,i1,for(ii2,i2,el(res,ii1,ii2):expr1)),res,3,1)[/MATH]
[MATH lang=eng]apply(res,expr,i1,i2):line(ii1:i1,ii2:i2,for(i1,ii1,for(i2,ii2,el(res,i1,i2):expr)),res,4,1)[/MATH]
The input
[MATH lang=eng]el(M,i,j):i+j[/MATH]
would be translated to
[MATH lang=eng]apply(M,i+j,i,j)[/MATH]
But that would require your function decorating to cover both sides of an assignment.
The names in my examples are arbitrary, I would stick, however to something like vectorize(), vector() or vec(), as this would be consistent with Mathcad speech and with the decoration symbol.
WroteMaybe foreach(2) if it is not too long
![]()
unfortunately this is a popular statement too, like do/while...

WroteI see two different issues:
1. mapping functions or expressions to structures by element vec(expr)
- identify the variables in expression (without preprocessing
- get variable values (structures) from context
- iterate over the elements replacing the element values for the structure variable names in expr and building a result of the same structure as the variables.
This would require the variables in expression to be either of the same structure or scalars. You might relax that condition to variables being of identical length, if linear adressing is unique and well defined. Then you would return a vector of corresponding length.
I think, the right over-arrow just like in Mathcad would be appropriate, even if I'd rather like arrows, overbars or the like to be available as decorations for variable names.
This is essentally what your function do() does already, except that perhaps the function could find out by itself, which variable to iterate over.
2. Implicit loops to generate matrix or vector results. Input is the index equation or it's parts (result name, expression, index names). I failed to provide a working example, the definitions might illustrate, what I mean.
[MATH lang=eng]apply(res,expr,i1,i2):line(expr1:at(expr,sys(i1≡ii1,i2≡ii2,2,1)),for(ii1,i1,for(ii2,i2,el(res,ii1,ii2):expr1)),res,3,1)[/MATH]
[MATH lang=eng]apply(res,expr,i1,i2):line(ii1:i1,ii2:i2,for(i1,ii1,for(i2,ii2,el(res,i1,i2):expr)),res,4,1)[/MATH]
The input
[MATH lang=eng]el(M,i,j):i+j[/MATH]
would be translated to
[MATH lang=eng]apply(M,i+j,i,j)[/MATH]
But that would require your function decorating to cover both sides of an assignment.
The names in my examples are arbitrary, I would stick, however to something like vectorize(), vector() or vec(), as this would be consistent with Mathcad speech and with the decoration symbol.
The function was thinked to handle functions with scalar single unknown; I think could be extendeded to other cases using (implicitly) at(2) when there are more than a single unknown, limiting the evaluation at the first nesting level (or maybe not, looking from the deepest level and going up, but this is another step...). As for the "dress" I don't like a LHS+RHS approach, because in this case it would seem an assignment instead of a function (and if you place a function on the canvas without an evaluation, nothing happens); as first approach I've thinked to a modified version of at(2) or el(2), with some bracket [#] <#> or symbol @# near the subscript (BTW apply is not a bad idea...).
How would you write your do() functions on paper? That might then inspire the "dressing".
-
Новые сообщения
-
Нет новых сообщений