Skip to main content
8 events
when toggle format what by license comment
Apr 4, 2014 at 8:56 comment added Yves Klett @Phab see my edit, all you need is N ;-) Oh, and you could use Reverse to efficiently reverse, e.g. try Reverse[{{a, b}, {c, d}}, 2]. Your replacement-based solution can be dangerous, e.g. for 2x2 matrices...
Apr 4, 2014 at 8:55 history edited Yves Klett CC BY-SA 3.0
added 282 characters in body
Apr 4, 2014 at 8:55 comment added Phab SOLVED THE PROBLEM: dont use the heads: data=data/.{a_, b_}:>{b, a} works fine!
Apr 4, 2014 at 8:47 comment added Phab Just one little problem: when importing, all numbers are reals, with your string method the zeros and ones (in the example) are integers. ... later I'm doing a replacement with data=data/.{a_Real, b_Real}:>{b, a} ... so you see the problem: it does not switch the integers.
Apr 4, 2014 at 8:25 comment added Yves Klett Excellent. Perhaps better answers are on the way - it should be doable to write a menu entry to "paste as mat from clipboard" or similar, but no time right now.
Apr 4, 2014 at 8:24 comment added Phab Simple solution for copy/paste! That's what I need for the moment. I'll keep trying to find a nicer solution for importing my data with MATLink or Import.
Apr 4, 2014 at 8:21 vote accept Phab
Apr 4, 2014 at 7:28 history answered Yves Klett CC BY-SA 3.0