help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Octave equivalent to Matlab buttondownfcn?


From: Sar gan
Subject: Octave equivalent to Matlab buttondownfcn?
Date: Tue, 23 Feb 2010 02:27:23 -0800

 
Hello,

What is the Octave equivalent to Matlabs buttondownfcn()?
I'm looking for a way to get pixel values base on a mouse button down click.

-------------------Matlab code-----------------

     img=magic(5);
     subplot(3,3,[1,2,4,5,7,8]);
     ih=imagesc(img);
     axis image;
     com={
          'cp=round'
          '(get(gca,''currentpoint''));'
          'r=[cp(1),cp(3)];'
          'r=[r,img(r(2),r(1))]'
     };
     set(ih,'buttondownfcn',[com{:}]);

-----------------------------------------------------


Thank you,


F

reply via email to

[Prev in Thread] Current Thread [Next in Thread]