Error: Function definitions are not permitted in this context.
Afficher commentaires plus anciens
HI,
I already went through the forums and I don't seem to understand the issue. I just switched to a new PC and this script/function was working on my old PC not more than a few hours ago. It's for displaying datestr with the data cursor. I got it from... https://www.mathworks.com/matlabcentral/newsreader/view_thread/265493 at the very bottom and it had worked perfectly. Now I get an error saying it's not permitted.
the saved file....
function txt = myupdatefcn(empt,event_obj)
% Customizes text of data tips
pos = get(event_obj,'Position');
txt = {['time: ',datestr(pos(1))],...
['amplitude: ',num2str(pos(2))]};
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur File Operations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!