[SS-3525] assigning element to matrix resets its size - matrix created artificially - Сообщения
I have some matrices. I just exclude single column from each of them and then I glue them together.
So in my real sheet I never glue the same matrix twice.
Here comes another example where I try to augment some vectors to new matrix.
I have many vectors and they are indexed so I can use program to augment them in a loop.
m is a matrix-valued expression rather than a matrix (expression with mat() being the top level object). We had this already with index values being expressions instead of variables.
Thus, the existing m is not recognized as a matrix and therefore not modified but overwritten.
You need to make sure that m is actually stored as matrix, i.e. by applying eval() or by just evaluating numerically (you did symbolically)
I'd prefer SMath to actually check if m evaluates to a matrix and then deciding what to do.
Ass_elem_Matrix_Kr.sm (5 КиБ) скачан 42 раз(а).
WroteOk, I probably did not clarify my real needs.
That will handle your projects more conveniently.
Poland.sm (15 КиБ) скачан 41 раз(а).
However I think if something looks like matrix it should behave like one. But it is not.
The history of building a matrix affects it
And I treat it as a flaw.
error_matrices_notequal.sm (8 КиБ) скачан 37 раз(а).
you can, however, enforce this by setting the previous two assignments to numeric optimization in the context menu.
This complies to the survival rule "never use symbolic optimization unless you know what you are doing".
WroteThis complies to the survival rule "never use symbolic optimization unless you know what you are doing".
Can't be more right Martin !
I vote for default calculation Numeric, instead of Symbolic.
WroteThe flaw is that m is not evaluated before applying the by-element assignment.
you can, however, enforce this by setting the previous two assignments to numeric optimization in the context menu.
Your solution works, it was enough to set it for first assignment. I have to comment it in code at least. Thank you.
However I am programmer and for program to be clear everything shall be set in a visible manner (in code). So fiddling with some options in context menu instead of setting them by code is unacceptable.
WroteSo fiddling with some options in context menu instead of setting them by code is unacceptable.
A collection is just a collection.
A matrix supports all matrix operation for concluding a project
Generally, a matrix results from the project itself
Smath works by itself, not from invented not compatible code.
Please be more specific about what you are attempting.
Wrote
Please be more specific about what you are attempting.
First of all, I want to say, that I like SMath Studio very much and I use it, whenever I have to prepare some calculations for students or in my projects. I once was co-author of book covering exercises in Mathcad. SMath studio is small, uncluttered and (mostly) does what is expected to do. And is free so I don't have to manage licenses, take care of keys and so on. I once paid some bucks to the author and gladly repeat it as program gets better.
But coming back to my being more specific: If I see matrix in the code (not necessarily mine) I expect it to behave like matrix and that's all.
Let's assume I got quite large project which can also reference to other files by include("..." ) add-in. So I have two matrices in front of me (see screenshot). I want to change a single element in each of them. Shall I go back and read all the code before to check if it can be done? The general question is: if we have two identical looking chairs shall we expect one of them not to be a chair but a briefcase with a chair in it?
Wrote[
However I am programmer and for program to be clear everything shall be set in a visible manner (in code). So fiddling with some options in context menu instead of setting them by code is unacceptable.
You might vote for https://smath.info/bts/Issues/IssueDetail.aspx?id=19. This feature request is exactly tailored to your need.
It is a long standing issue with second highest voter rate ever, yet no sign of hope out there...
Yet I encourage all users to file bug reports instead or at least in addition to forum posts on bugs, because forum discussions rapidly fade out of sight, whereas the bug tracking system is transparent and user friendly. I did that already for now, see SS 3525.
And SS-19 is not typical for the responsiveness of the developers, sometimes you get the fix within hours.
WroteWroteSo I have two matrices in front of me (see screenshot)
Your original 'm' is a matrix.
Your concluded 'm' is NOT a matrix, simply a collection.
(...)
Ok, but you probably agree that they look the same when displayed. So I think there is a problem that they are not distinguishable (by looking at them) as long as you don't make any operation on each one.
WroteOk, but you probably agree that they look the same when displayed.
Sorry, but can't help more.
You must have projects that produce something.
WroteI'm wondering, are you looking for an array to display differently than a matrix? I had an issue reviewing a sheet where this would have helped. In Mathcad, an array looks like an spreadsheet while a matrix looks just like it does now
I wouldn't care if they were the same thing. But they aren't.
Probably Mathcad approach would have helped.
WroteI'm wondering, are you looking for an array to display differently than a matrix?I had an issue reviewing a sheet where this would have helped.In Mathcad, an array looks like an spreadsheet while a matrix looks just like it does now
I understand nothing w/o the problem sheet.
CellArray.sm (9 КиБ) скачан 41 раз(а).
-
Новые сообщения
-
Нет новых сообщений