Request for a different vector/matrix XMCD export

Request for a different vector/matrix XMCD export - rmix22 - Сообщения

#1 Опубликовано: 26.08.2013 09:22:26
rmix22

rmix22

3 сообщений из 15 понравились пользователям.

Группа: User

I really appreciate the XMCD File plug-in and understand that it has quite some limitations yet.

One thing which was a problem for me was the export of vector and matrix elements.
A vector element like "v[3" is exported as "el(v,3)" and el() is of course unknown by Mathcad. Not difficult to learn Mathcad a new trick by providing a simple user defined function el(X,i):=X[i.
Likewise is a Matrix element like "M[2,4" exported as el(M,2,4) and I could write a similar function for that case.
But what to do if I use elements of vectors AND of matrices in my sheet? Mathcad doesn't allow the creation of user functions with a variable number of parameters and that way el() would work for vectors OR matrices, but not for both.
A workaround would be not to use vectors at all in SMath and replace "v[3" by "v[3,0". But thats awkward and not possible in every case.

Best solution I could think of (assuming its not possible for some reason to export the elements as real Mathcad matrix elements w/o el()) would be to use two different function names el1() and el2() so we could replace them in Mathcad.

P.S.: Is there a reason that I cannot delete completely the second index of a Matrix element (making it a vector element with just one index)? If I type accidentally a comma after the first index I would not be able to correct that error but would have to delete and retype the whole thing again.
#2 Опубликовано: 26.08.2013 10:53:18
Martin Kraska

Martin Kraska

1222 сообщений из 2150 понравились пользователям.

Группа: Moderator

Wrote


P.S.: Is there a reason that I cannot delete completely the second index of a Matrix element (making it a vector element with just one index)? If I type accidentally a comma after the first index I would not be able to correct that error but would have to delete and retype the whole thing again.


I think, it is just an immaturity of the math region editor. If you really want to avoid re-typing, then copy the expression to the clipboard, paste somewhere (text region or text editor), delete the third argument, copy and paste back in the math region.

Similar procedure for erasing spurious bracket levels: cut the contents to the clipboard, delete the bracket, paste from clipboard. Also not really convincing to nowaday's users.
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 пользователям понравился этот пост
rmix22 26.08.2013 11:12:00
#3 Опубликовано: 26.08.2013 11:29:54
rmix22

rmix22

3 сообщений из 15 понравились пользователям.

Группа: User

Wrote

Wrote


P.S.: Is there a reason that I cannot delete completely the second index of a Matrix element (making it a vector element with just one index)? If I type accidentally a comma after the first index I would not be able to correct that error but would have to delete and retype the whole thing again.


I think, it is just an immaturity of the math region editor. If you really want to avoid re-typing, then copy the expression to the clipboard, paste somewhere (text region or text editor), delete the third argument, copy and paste back in the math region.

Similar procedure for erasing spurious bracket levels: cut the contents to the clipboard, delete the bracket, paste from clipboard. Also not really convincing to nowadays users.



Thanks, really not convincing but at least a way to do it and I get a vague idea about the complexity behind that - after all its not a simple text editor. In playing around a bit more with SMath I found editing and especially deleting rather uncomfortable, but that may be due to habit. I am not used to utilize the backspace key but rather delete, maybe in conjunction with shift arrow key before to mark a subexpression. SMath forces me using the backspace key as the delete key won't work in many situations. Thtas new to me, so it feels uncomfortable unless I will get accustomed to it. I remember continuously cursing Mathcad (and sometimes doing it still nowadays) when I had to edit a more complex expression - by no means intuitive and natural, too. Very often ended up in typing the whole mess again from scratch.
#4 Опубликовано: 26.08.2013 11:32:02
kilele

kilele

133 сообщений из 397 понравились пользователям.

Группа: User

Wrote


If I type accidentally a comma after the first index I would not be able to correct that error but would have to delete and retype the whole thing again.



ctrl+z just after typing comma by mistake ?
#5 Опубликовано: 26.08.2013 11:45:01
rmix22

rmix22

3 сообщений из 15 понравились пользователям.

Группа: User

Wrote

Wrote


If I type accidentally a comma after the first index I would not be able to correct that error but would have to delete and retype the whole thing again.



ctrl+z just after typing comma by mistake ?



Sure a way, but as I am used to delete if I see something which shouldn't be there my first reaction would be the delete key (don't ask why, just by habit not the backspace key, which sure would be more natural in that case).
Maybe I don't use ctrl-z because on German keyboards Y and Z are swapped and so ctrl-z is not a simple one hand thing.
Guess its all a matter of habit and one has to get accustomed to the way a program wants it to be done. Just was curious if it really wouldn't be able to delete the second index but thats the way it is - good to know.

I also wished we could have a comma or semicolon between the indices - expressions like the attached would be better to grasp on first sight.



Matindex.png
#6 Опубликовано: 26.08.2013 11:55:02
kilele

kilele

133 сообщений из 397 понравились пользователям.

Группа: User

Parenthesis ?

Edit :

Sorry for the monosyllables, today I'm not confident with english, in real life it may worse, sometimes I speak only with my hands or say mmmm
#7 Опубликовано: 26.08.2013 13:47:31
rmix22

rmix22

3 сообщений из 15 понравились пользователям.

Группа: User

Wrote

Parenthesis ?



Sure a possibility, but on one side it could look like a product, too and moreover I am lazy by nature. If the software would throw in the comma or semicolon we wouldn't have to think about workarounds for structuring the appearance and most notably it would be closer to normal math notation.

So if would be possible to implement it with reasonable efforts I'll stick to it as a Feature Request.

Main request BTW was matrix XMCD export and I think this may not be that easy to get as it would be idiosyncratic with respect to the rest of the program structure, I guess. But then, I may be wrong.
1 пользователям понравился этот пост
Davide Carpi 26.08.2013 14:22:00
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений