Mathcad Toolbox - Contains analogs of functions from Mathcad - Messages
#181 Posted: 6 months ago
#182 Posted: 6 months ago
Wrote... It looks strange, maybe I'll add some numbering: #1, #2, #3, ...
Hi. That's the Mathematica default notation for pure function's arguments: https://reference.wolfram.com/language/howto/WorkWithPureFunctions.html
Best regards.
Alvaro.
1 users liked this post
Вячеслав Мезенцев 6 months ago
#183 Posted: 5 months ago

Plugin updated.
Changes:
- fixed image handling functions (READRGB(),...);
- the appearance of brackets has been changed;
- added the ability to explicitly specify an insert for MathcadBlock (##, #1, #2, ...).
mathcadblock-explicit-paste.sm (15 KiB) downloaded 43 time(s).
Russia ☭ forever, Viacheslav N. Mezentsev
1 users liked this post
sergio 5 months ago
#184 Posted: 5 months ago
Expanding the idea of numbering, we can add syntax:
## - take all as sys|mat|line
#i#j - take from i to j
##j - take from 1 to j
#i# - take from i to end
and
#i#js - sys(#i,..,#j)
#i#jm - mat(#i,..,#j)
#i#jl - line(#i,..,#j)
#i#jfun - fun(#i,..,#j)
or
### - insert as parameters: foo(x,y,###) -> foo(x,y,#1,#2,...)
##3# - insert as parameters: foo(x,y,##3#) -> foo(x,y,#1,#2,#3)
## - take all as sys|mat|line
#i#j - take from i to j
##j - take from 1 to j
#i# - take from i to end
and
#i#js - sys(#i,..,#j)
#i#jm - mat(#i,..,#j)
#i#jl - line(#i,..,#j)
#i#jfun - fun(#i,..,#j)
or
### - insert as parameters: foo(x,y,###) -> foo(x,y,#1,#2,...)
##3# - insert as parameters: foo(x,y,##3#) -> foo(x,y,#1,#2,#3)
Russia ☭ forever, Viacheslav N. Mezentsev
#185 Posted: 5 months ago
I encountered a plot problem with the list version of rkfixed(). Probably this also applies to other ODE-integrators with embedded function assignment.
In the native 2D Plot:
- When plotting a solution function along with a matrix of marker points, then the points won't display
- Yet, when using lspline() directly, both objects plot without problems.
In X-Y Plot:
- When the independent variable has the same name as the solution function (e.g. x(x), then x() is not treated as a function but as the expression x (similar with v(v) or any other name).
- A workaround is to use a variable name different from the function name. Yet this is strange, because in SMath x() and x usually are independent objects.
plotproblem.sm (30 KiB) downloaded 31 time(s).
![2024-11-13 17_08_58-SMath Solver - [plotproblem.sm_].png](/en-US/file/da36GC/2024-11-13-17_08_58-SMath-Solver---_plotproblem_sm___png)
In the native 2D Plot:
- When plotting a solution function along with a matrix of marker points, then the points won't display
- Yet, when using lspline() directly, both objects plot without problems.
In X-Y Plot:
- When the independent variable has the same name as the solution function (e.g. x(x), then x() is not treated as a function but as the expression x (similar with v(v) or any other name).
- A workaround is to use a variable name different from the function name. Yet this is strange, because in SMath x() and x usually are independent objects.
plotproblem.sm (30 KiB) downloaded 31 time(s).
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 users liked this post
Вячеслав Мезенцев 5 months ago
#188 Posted: 5 months ago
Russia ☭ forever, Viacheslav N. Mezentsev
1 users liked this post
Alvaro Diaz Falconi 5 months ago
#189 Posted: 5 months ago
Visualization of transformations and matrix norms using implicit plots and automatic scaling of the X-Y plots.

Matrixnormen 2D.sm (28 KiB) downloaded 36 time(s).
Matrixnormen 2D.sm (28 KiB) downloaded 36 time(s).
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
3 users liked this post
#190 Posted: 4 months ago
I want to add a set of simple examples to the Mathcad block context menu that demonstrate how it works. Can you suggest such examples?
Similar to the X-Y Plot component. In this case, you will be able to fill in not only the input values, but also the description. You can insert arbitrary expressions inside the component.
Imagine that you can formalize the solution to a simple problem. What would you suggest as educational examples?
Similar to the X-Y Plot component. In this case, you will be able to fill in not only the input values, but also the description. You can insert arbitrary expressions inside the component.
Imagine that you can formalize the solution to a simple problem. What would you suggest as educational examples?
Russia ☭ forever, Viacheslav N. Mezentsev
1 users liked this post
Martin Kraska 4 months ago
#191 Posted: 4 months ago
WroteImagine that you can formalize the solution to a simple problem. What would you suggest as educational examples?
I suggest a handbook like Martin's one, with examples where the user can reuse the code (Code reusability is the technical expression for when you don't want to say that you are going to copy and paste). Or like Mathcad quicksheets. This is my idea of a clean use of the block for solving high school problems.
BasicHandbook-nsol.pdf (352 KiB) downloaded 46 time(s).
BasicHandbook-nsol.sm (327 KiB) downloaded 35 time(s).
Best regards.
Alvaro.
5 users liked this post
NDTM Amarasekera 4 months ago, Martin Kraska 4 months ago, francesco rapuano 4 months ago, sergio 4 months ago, Вячеслав Мезенцев 4 months ago
#192 Posted: 4 months ago
I'd like to have such things like nsol in SMath core.
How about embedded assignment, similar to FindRoot? I don't like poking the values out of S. I see that this might reduce flexibility, e.g. in the case of parametrized initial guess.
I tried to demonstrate a generic approach, i.e. you get the variables assigned without having to issue any specific command except for the generic content of the placeholder. It is just a try and fails with single variables but you get the idea.
Of course, one would like to have a solve block without the cryptic generic expression in the placeholder.
Perhaps, such a block could be created from the insert menu with pre-allocated content of the placeholder and with setting it to hidden.
![2024-12-13 13_47_32-SMath Solver - [BasicHandbook-nsol.sm_].png](/en-US/file/Rkunpm/2024-12-13-13_47_32-SMath-Solver---_BasicHandbook-nsol_sm___png)
BasicHandbook-nsol_Kr.sm (333 KiB) downloaded 33 time(s).
How about embedded assignment, similar to FindRoot? I don't like poking the values out of S. I see that this might reduce flexibility, e.g. in the case of parametrized initial guess.
I tried to demonstrate a generic approach, i.e. you get the variables assigned without having to issue any specific command except for the generic content of the placeholder. It is just a try and fails with single variables but you get the idea.
Of course, one would like to have a solve block without the cryptic generic expression in the placeholder.
Perhaps, such a block could be created from the insert menu with pre-allocated content of the placeholder and with setting it to hidden.
BasicHandbook-nsol_Kr.sm (333 KiB) downloaded 33 time(s).
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 users liked this post
Alvaro Diaz Falconi 4 months ago
#193 Posted: 4 months ago
Hi Martin. I put "0" as argument because there are no more args. The second could be a vector of options, like this:

or the solved variables. Also, I use "S" because this error, which I imagine that could be corrected, but don't know how hard it could be:

Best regards.
Alvaro.
PD: Notice that x# : transpose(str2num(x#))*diag(U#) or x# : diag(U#)*str2num(x#) if you want to return the answer as column vector, like normal people, returns x# as scalar if length(x#) = 1.
or the solved variables. Also, I use "S" because this error, which I imagine that could be corrected, but don't know how hard it could be:
Best regards.
Alvaro.
PD: Notice that x# : transpose(str2num(x#))*diag(U#) or x# : diag(U#)*str2num(x#) if you want to return the answer as column vector, like normal people, returns x# as scalar if length(x#) = 1.
#194 Posted: 4 months ago
Wrote... How about embedded assignment, similar to FindRoot? I don't like poking the values out of S. I see that this might reduce flexibility, e.g. in the case of parametrized initial guess
Hi Martin. I think the opposite: the implicit assignment of the names of the variables sought to a solution makes its call very rigid, since many times there is no direct relationship between the variables of the equation and the names of the variables that are intended to be assigned to the solution, as is precisely demonstrated in this case
Another variant among many would be to find a limiting speed and call the result v.lim, even though the variable of the equation is "v".
Best regards.
Alvaro.
#195 Posted: 4 months ago
4 users liked this post
Alvaro Diaz Falconi 4 months ago, sergio 4 months ago, churichuro 4 months ago, Oscar Campo 4 months ago
-
New Posts
-
No New Posts