Sign in

username:

password:



Not a member?

Search matlab



Search tips

Subscribe to matlab



matlab by Keywords

Atanh | Autocorrelation | Bandpass Filter | C++ | Conv | Database | Deconv | Excel | FFT | Filter | Filtering | FIR | Fourier Transfrom | FSK | Gaussian Noise | Haykin | IFFT | Image | Java | LFSR | LMS | LPC | MEX | OFDM | QPSK | Radix | Random | Sampling | Segmentation | Simulink | Visual Basic | Waveform | Wavelet

Ads

Discussion Groups

Discussion Groups | Matlab DSP | Moving Horizontal Line Marker

Technical discussion about Matlab and issues related to Digital Signal Processing.

  

Post a new Thread

Moving Horizontal Line Marker - marc...@gmail.com - Jul 30 10:43:51 2008



Hi!!

I downloaded some code from mathworks.com that puts a marker on vertical marker on a figure
that can be moved horizontally. I would like to modify the code so that it puts a horizontal
marker that can be moved vertically. So far I am able to modify the code to all the horizontal
marker be placed. I have reached a part of the code that I do not understand how to edit. I
have tried to replace h for v. 

Original code:
h_text(i) = text(xpos,ymid,label,'color',get(h(i),'color'),'UIContextMenu',cmenu_text,...
        'UserData',1,'HorizontalAlignment','Left');
    set(h_text(i),'ButtonDownFcn',@DownFcn)
    set(h_text(i),'EraseMode','xor')
    set(h(i),'UserData',h_text(i))

My edit:
 v_text(i) = text(ypos,xmid,label,'color',get(v(i),'color'),'UIContextMenu',cmenu_text,...
        'UserData',1,'VerticalAlignment','Bottom');
    set(v_text(i),'LeftDownFcn',@DownFcn)
    set(v_text(i),'EraseMode','xor')
    set(v(i),'UserData',v_text(i))

I reason that I can simply replace 'Left' for 'Bottom' as they are the most negative and
'Right' for 'Top. However I cannot replace 'ButtonDownFcn' for 'TopDownFcn' and I have
established that the problem lies here by stepping through both codes (the original and my
edition) one line at a time. Please help. In case the original program is called data_marker.m
and is available on mathworks website.

Thanks in advance
Duro



(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )