Rank: 1176 based on 57 downloads (last 30 days) and 4 files submitted
photo

Kang Zhao

E-mail
Company/University
DLUT,Dalian,China

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by Kang View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
15 Nov 2008 Trace the Position of Cursor without Click It works like GINPUT provided by MATLAB,but traces the position of cursor without click ... Author: Kang Zhao cursor, ginput, gui tools, position, trace, example 45 7
  • 4.85714
4.9 | 7 ratings
23 Apr 2003 varea.m Compute the area and judge the direction of a closed curve. Author: Kang Zhao data exploration, area, direction, clockwise, graphics 2 0
  • 5.0
5.0 | 1 rating
23 Apr 2003 clockwise.m Judging the direction of a closed curve by provided coordinates of node. Author: Kang Zhao data exploration, direction, clockwise, coordinates, nodes, graphical 1 0
22 Apr 2003 Screenshot Connecting Two Points connecting two points with a line with arrowhead Author: Kang Zhao graphics, arrowhead, arrow, plotting, specialized, points 9 2
  • 5.0
5.0 | 2 ratings
Comments and Ratings on Kang's Files View all
Updated File Comment by Comments Rating
19 Apr 2011 Trace the Position of Cursor without Click It works like GINPUT provided by MATLAB,but traces the position of cursor without click ... Author: Kang Zhao Alonso, Matías

This should be native on MATLAB.

28 Nov 2009 Connecting Two Points connecting two points with a line with arrowhead Author: Kang Zhao Dabirmoghaddam, Ali

I was looking for a built-in method of drawing arrows in MATLAB for hours. I could not find any, but this is exactly what I was looking for. Thank you, Kang.

22 Aug 2008 Trace the Position of Cursor without Click It works like GINPUT provided by MATLAB,but traces the position of cursor without click ... Author: Kang Zhao P., Daniel

I haven't taken a look at the all code yet and I haven't done any testing yet, but there *might* be a bug: see lines 45 and 46. A variable named "left_origin" is defined in line 45, but it is never used.
In line 46, a variable named "left_origin_unitfig" is used. At this point, the variable still has the value it got in line 42. I don't know if that's intended or not.

Regards,
Daniel P.

28 Mar 2008 Trace the Position of Cursor without Click It works like GINPUT provided by MATLAB,but traces the position of cursor without click ... Author: Kang Zhao P., Tuss

Brilliant m file, Zhao. Thank you very much for sharing this with us. I noticed that your function returns only x coordinates on the axes twice rather than x and y coordinates at the same time. I invoke the function like this.
"f = figure;
a = axes;
h = plot(t,x);
set(f,'windowbuttonmotionfcn','gpos(a)'); "

Should there be anything wrong with this, please kindly let me know. But as far as I have tried, no errors at all.

To Frank, please note the argument when you invoke
"gpos(h)
set(h,'WindowButtonMotionFcn',@gpos)"

It requires string argument rather function handle. You need axes handle and figure handle as shown below.

f = figure;
a = axes;
plot(something you want)
set(f,'windowbuttonmotionfcn','gpos(a)');

Hope this helps. Please let me know if you have further problems.

29 Jan 2008 Trace the Position of Cursor without Click It works like GINPUT provided by MATLAB,but traces the position of cursor without click ... Author: Kang Zhao Pezzullo, Frank

HI ... can i have an example code to run your function ... I try with my example but doesn't work. Thanks

My Example is:

t = (0:0.05:1)';
d1 = sin(2*pi*t)*[1 2 3];
d2 = cos(2*pi*t)*[1 2 3];
h=plot(t,[d1 d2]);
gpos(h)
set(h,'WindowButtonMotionFcn',@gpos)

Top Tags Applied by Kang
clockwise, data exploration, direction, graphics, area
Files Tagged by Kang View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
15 Nov 2008 Trace the Position of Cursor without Click It works like GINPUT provided by MATLAB,but traces the position of cursor without click ... Author: Kang Zhao cursor, ginput, gui tools, position, trace, example 45 7
  • 4.85714
4.9 | 7 ratings
23 Apr 2003 varea.m Compute the area and judge the direction of a closed curve. Author: Kang Zhao data exploration, area, direction, clockwise, graphics 2 0
  • 5.0
5.0 | 1 rating
23 Apr 2003 clockwise.m Judging the direction of a closed curve by provided coordinates of node. Author: Kang Zhao data exploration, direction, clockwise, coordinates, nodes, graphical 1 0
22 Apr 2003 Screenshot Connecting Two Points connecting two points with a line with arrowhead Author: Kang Zhao graphics, arrowhead, arrow, plotting, specialized, points 9 2
  • 5.0
5.0 | 2 ratings

Contact us at files@mathworks.com