1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
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
    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!
     
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted



Similar Discussions: Visualizing arrays using imagesc and Octave
  1. Visual proofs (Replies: 5)

Loading...