Skip to main content
9 events
when toggle format what by license comment
Mar 19, 2012 at 23:06 vote accept yohbs
Mar 19, 2012 at 22:45 comment added acl Yes, I could change 2 to Length@Dimensions[c] to fix that, but there must be a better way
Mar 19, 2012 at 22:39 vote accept yohbs
Mar 19, 2012 at 22:39
Mar 19, 2012 at 22:39 comment added yohbs Great. How did I not try this first?
Mar 19, 2012 at 22:34 comment added Rojo Yeah. RM's second solution is the only "bullet-proof" one so far. Your solution doesn't work for arbitrary dimensional tensors unless you manually change the 2
Mar 19, 2012 at 22:29 comment added acl Right, I see. He has in mind a symbolic matrix on the left hand side, because this does not work for both numerical (also this is what it seems from his motivation).
Mar 19, 2012 at 22:27 comment added Rojo Yes, to be consistent with what he was doing for matrices
Mar 19, 2012 at 22:26 comment added acl this evaluates A==B, then maps Flatten over the result; is this what you intended? (compare Thread[Flatten /@ (a \[Equal] b)] // Trace to the trace of the code I give in my answer to see what I mean)
Mar 19, 2012 at 22:22 history answered Rojo CC BY-SA 3.0