Quantcast
Channel: Comparing elements in a nested list to generate a new list - Mathematica Stack Exchange
Browsing all 2 articles
Browse latest View live

Answer by kglr for Comparing elements in a nested list to generate a new list

You can use Differences + Clip Clip[Differences[lst], {-.01, .01}, {"-", "+"}] /. _?NumericQ -> "=" {{"+", "-", "-", "+", "="}, {"-", "=", "-", "+", "-"}} Alternatively, Differences + Chop + Sign...

View Article



Comparing elements in a nested list to generate a new list

I have a 2-level list in the form of a $m\times n$ matrix: {{a11,a12,a13,...,a1n},{a21,a22,a23,...,a2n}, ..., {am1,am2,am3,...,amn}}, in which the numbers are normally decimals. Now, I need to compare...

View Article
Browsing all 2 articles
Browse latest View live


Latest Images