Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Visualizing arrays using imagesc and Octave

  1. Sep 14, 2011 #1

    Given that I have say a vector A:


    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?

  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?