Error: Function definitions are not permitted in this context.
Mostrar comentarios más antiguos
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))]};
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre File Operations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!