The adjustable resistive state of memristors makes it possible to implement sparse coding algorithms naturally and efficiently.