When I open the documentation for DATACURSORMODE and evaluate the following code:
fig = figure;z = peaks;plot(z(:,30:35))dcm_obj = datacursormode(fig);set(dcm_obj,'DisplayStyle','datatip','SnapToDataVertex','off')% Click on line to place datatip
c_info = getCursorInfo(dcm_obj);set(c_info.Target,'LineWidth',2) % Make selected line wider
I receive the following error message:
??? Attempt to reference field of non-structure array.
Best Answer