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

Want gray scale image of a matrix in matlab

  1. Aug 14, 2015 #1
    I am creating a gray-scale image of a 2000*2000 matrix using mat2gray and imshow command.But highest number of matrix entries that imshow can implement is 500*500 approximately.After that it shows------

    "Warning: Image is too big to fit on screen; displaying at 8%
    > In imuitools\private\initSize at 72
    In imshow at 259 "

    I know what is going on here but I want my all 2000*2000 matrix entries to be plotted in gray-scale. Is there any possible way?Please suggest some easy way because I am new in matlab.
     
  2. jcsd
  3. Aug 14, 2015 #2

    jedishrfu

    Staff: Mentor

    You could reduce your 2000x2000 to a 500x500 array by taking every fourth element or better yet average the elements in a 4x4 square to be the single element in the 500x500 image.
     
  4. Aug 14, 2015 #3
    No I want full resolution.Because for 500*500 case boundaries in image is not sharp enough for experimental purpose.
     
  5. Aug 15, 2015 #4
    If you can write the matrix to a file you can use gnuplot.
    Not sure which functions you should/could use but it's possible. (I used it once for a simulation of the Ising model)
     
  6. Aug 15, 2015 #5

    jedishrfu

    Staff: Mentor

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Want gray scale image of a matrix in matlab
  1. Axis scale in matlab (Replies: 1)

Loading...