Assign submatrices

Assign submatrices - Mensajes

#1 Publicado: 5/10/2016 19:23:25
Mike Kaganski

Mike Kaganski

184 me gusta en 434 mensajes.

Grupo: User

A bit of prerequisite history:

1. "Assign variables/functions put into the vector/matrix" feature announced.

2. "Extracting submatrices using ranges as indices" feature requested.

3. Its implementation announced.

4. Question about putting a matrix into a submatrix posted.

Currently it's impossible to use assignments like this:

AssignSubmatrix.png

The proposal is to enable such syntax.
С уважением, Михаил Каганский
#2 Publicado: 6/10/2016 12:33:21
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: User

I understand the code you are proposing, but wonder if useful.
It would be local anyway, which Smath has it already.

Forum Insert SubMatrix.gif
#3 Publicado: 6/10/2016 18:31:21
Mike Kaganski

Mike Kaganski

184 me gusta en 434 mensajes.

Grupo: User

1. What I propose can be seen as "syntactic sugar". As such, it is not strictly *required*, but desirable.
2. Also, this proposal enables syntax that seem "natural" based on previous enhancements (cited in the first post). It improves consistency and discoverability (intuitivity) of features.
3. It enables syntax known from MathCad. This is again not a requirement, but lowers learning curve for newcomers.

All talk about "unneeded features" on the basis that the feature *may be* implemented using programming is bullshit. Yes, you can, and actually you even don't need SMath for this, only abacus being Turing-complete. So what? Let's call SMath not needed, and spend time on reinventing wheels, or searching for wheels someone had implemented before, and then spend time on debugging because when you took someone else' code, you didn't see that that code used "foreign" concept of MathCad zero-based indices? Or difficult-to-find bugs in edge cases?

You may only call a proposal not needed, if it makes software *worse* in some sense. E.g., has a different paradigm and thus makes interface inconsistent.

Developers may decide not to implement useful features, because they may percept it to be too difficult to implement compared to possible benefit (so their time would be better spent for other tasks), or it may be impossible in used architecture, or something. Then't OK. But that's another story.

There also exists the following, for some, more substantial need:
4. Speed. In-built functions involving mass operations like vectorize() or this one may be optimized much better, and even use multi-processing (vectorizing) e.g. in GPU, thus parallelizing work manifold WRT functional approach. User functions in SMath, being greatest feature, are inherently slower than in-built/plugin.
С уважением, Михаил Каганский
#4 Publicado: 6/10/2016 19:52:36
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: User

You can improve your "syntactic sugar" even more practical, Mathcad style.
i:=1..n
j:=1..n
M[i,j :=Mandelbrot
#5 Publicado: 16/1/2018 1:49:04
Andrey Ivashov

Andrey Ivashov

2.343 me gusta en 4.056 mensajes.

Grupo: Super Administrator

Wrote

You can improve your "syntactic sugar" even more practical, Mathcad style.
i:=1..n
j:=1..n
M[i,j :=Mandelbrot



Started implementation of this feature in order to improve compatibility with other software:
arrays_calc.PNG

Best regards, Andrey Ivashov.
A 4 usuarios les gustó este mensaje
Martin Kraska 16/1/2018 4:04:00, frapuano 16/1/2018 4:35:00, Davide Carpi 16/1/2018 5:31:00, Radovan Omorjan 16/1/2018 14:22:00
#6 Publicado: 16/1/2018 4:06:53
Martin Kraska

Martin Kraska

1.361 me gusta en 2.275 mensajes.

Grupo: Moderator

Wrote


Started implementation of this feature in order to improve compatibility with other software:

Best regards, Andrey Ivashov.



Besides compatiblity to "other software" this will improve the readibility in comparison to the vectorize operator, which is not really clear to third party users.
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
#7 Publicado: 16/1/2018 10:56:46
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: User

Wrote

Started implementation of this feature in order to improve compatibility with other software:


Nice feature, Andrey ... keep up !
Vectorize operator works well.

Jean

VectorizeMaths.PNG

Pattern Mandelbrot RGB.sm (57,12 KiB) descargado 1594 vez(es).

Pattern Mandelbrot.sm (108,74 KiB) descargado 1510 vez(es).

  • Nuevos mensajes
  • Sin mensajes nuevos