Questions tagged [flipud]

2 questions
1
vote
1 answer

MATLAB unexpected behavior with colormap and flipud

I was trying to invert the colormap (change positive/negative color directions) with a call to 'flipud': colormap(flipud(hot)); % flips color map colormap(flipud('hot')); % no effect I didn't expect this result. For clarification, is this because…
1
vote
0 answers

Numerical precision in summing function

When I run import numpy as np # Create small random numbers a = np.random.rand(10) # Check whether their sum and their flipped sum is the same print(np.sum(a) == np.sum(a)) print(np.sum(np.flipud(a)) == np.sum(a)) the first statement is always…
lhcgeneva
  • 1,981
  • 2
  • 21
  • 29