Hi,

Given that I have say a vector A:

[0,1,2,3,4,5]

How can I use imagesc on this to get a graphic that would resemble a gradient (if you know what i mean, so that 0 is black ... to 5 being white) in a rectangle?

I've tried the simple call imagesc(A) in Octave which definitely works for matrices for me (eg. not m by 1 dimensional or 1 by m dimensional) but it is not working for this and gives me the error:

line 0: Sample period must be positive. Try `flip` for changing direction

Any clues?

Thanks!