Suppose I have two graphs of two different functions of two variables.
The functions are related in the sense that the domain of one is a (linear) transformation of the other.
I would like to plot both in a different window, 'walk' through the domain in one graph (with the datacursor) and see a datacursor appear at the function values of the second function in its (transformed) domain.
Is this possible?
Maybe start with a simplification where both domains are the same?
"bram derks" wrote
> I would like to plot both in a different window, 'walk' through the domain
> in one graph (with the datacursor) and see a datacursor appear at the
> function values of the second function in its (transformed) domain.
I believe the plot alternative "plt" found in the file exchange (search for "plt") will help since it data cursors are more sophisticated. Look at the example "demo\tasplt.m" since it does something similar to what you want. Two plots are created. Moving the cursor in plot 1 will also move the corresponding cursor in plot 2 (and visa versa) to keep them synchronized. The last 3 lines of the routine accomplish this feat. It's even simpler if you don't need the "visa versa" part. In that example the domains of the two graphs are the same, however since it synchronizes with respect to the index, the code will work as well with different domains as in your situation.
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Terms prior to use.