590 reputation
214
bio website bsl-support.de
location Germany
age
visits member for 2 years, 3 months
seen Jun 27 at 17:00

Jun
22
comment How to Set parts of indexed lists?
Leonid, what a solution, thank you. I had believed there is some 'easy' way - possibly upvalues - but your answer shows how deep the matter runs.
Jun
22
revised How to Set parts of indexed lists?
I changed 'array' to 'list' in the first sentence as that seems more precise.
Jun
22
comment How to Set parts of indexed lists?
As I had written to Szabolcs the reason for choosing an index was the more simple way to change existing code. But the SparseArray is simply the list-solution with better allocation of resources in case of lots of empty cells? I can't see how this is a replacement for an indexed var which essentially allows dynamic programming?
Jun
22
comment How to Set parts of indexed lists?
@jVincent, thank you for expanding your answer and it does help to clear the issue. Nevertheless it is a 'pity' that even the subscripted variable cannot be addressed by Part and Set. Essentially then you cannot have a truly indexed symbol?
Jun
22
comment How to Set parts of indexed lists?
The reasons for using indexed variables as opposed to lists is addressed in the Mathematica reference (reference.wolfram.com/mathematica/tutorial/…). Why should these reasons - sparse definitions made only when needed - not apply when the variable contains an array?
Jun
22
comment Using a built-in symbol as a variable
Input and Output are different matters as far as I know. You might and should use defintions starting with a lowercase letter to be on the safe side regarding conflicts but that does not hinder you to format any output like you want it to appear?
Jun
22
answered How to Set parts of indexed lists?
Jun
22
comment How to Set parts of indexed lists?
Szabolcs, I am just trying to have an indexed variable be a list or to be more precise an array. While in principle you are right that I might transfer every index to a numerical range and thus one could come around by simply adding the index-dimension to the arrray dimension, there is good reason to work with the 'sparse' definitions allowed by using an index for the variable itself. My problem at hand is that I am changing code already written. Adding the index in the variable name is a simple replacement. Adding it as an array dimension means a lot of work...
Jun
22
comment How to Set parts of indexed lists?
Just to make this clearer, I have edited the original question in order to make it clearer by having the index be a symbol.
Jun
22
awarded  Editor
Jun
22
revised How to Set parts of indexed lists?
I changed the index from a numerical value (1 before) to a symbol (e.g. 'i') in order to make this problem clearer and why thus adding the index as a new dimension to the tensor might not always be the option of choice.
Jun
22
comment How to Set parts of indexed lists?
Szabolcs, as written below, I am a bit amazed at what seems 'illogical' in not being able to address downvalues. I might have to use the list-option as you suggest, but for a more symbolic reference like matM[a] it would be very nice to do it the way I suggested. I should be possible, shouldn't it?
Jun
22
comment How to Set parts of indexed lists?
Thanks. But using the 'fixed' argument in a function is explicitly suggested in the Mathematica documentation (reference.wolfram.com/mathematica/tutorial/…) and for example in Sal Mangano's "Mathematica Cookbook". It is of course possible to make this an array adding the index dimension, but if - as in my real case - you want to use symbols like matM[a] is not so easy to do.
Jun
22
asked How to Set parts of indexed lists?
May
24
accepted How can you use and convert Gauss-Krüger-Coordinates in Mathematica?
May
23
comment How can you use and convert Gauss-Krüger-Coordinates in Mathematica?
Another observation is that it seems people at Wolfram Research have gotten the axes wrong. In geodesy as far as I have learned from web-research the x-axis should point north and the y-axis should point east. Have they missed that?
May
22
awarded  Self-Learner
May
22
comment How can you use and convert Gauss-Krüger-Coordinates in Mathematica?
As a side note: For some reason Mathematica seems not to be able to convert the gaussKruegerPosition into a WGS84-Position. GeoPosition[ gaussKruegerPosition[{3513495, 5405227}, 9, 500000], "WGS84"] returns the error "GeoPosition::invdtm:Unknown geodetic datum "WGS84". Use GeodesyData["Datum"] for a list of available named datums." This is strange as "WGS84" is of course explicitly listed under GeodesyData[] and accepted for GeoPositions. A bug?
May
22
answered How can you use and convert Gauss-Krüger-Coordinates in Mathematica?
May
22
awarded  Commentator