Bonjour,

J'avais à l'origine, un simple plot qui fonctionnait, mais finalement, il faut que j'ai 2axes y.
J'utilise donc plotyy, mais Matlab me dit :
??? Undefined function or method 'func2str' for input arguments of type 'double'.

Error in ==> plotyy>fevalfun at 355
                funcstr = func2str(func);

Error in ==> plotyy at 61
[h1,ax(1)] = fevalfun(fun1,ax(1),x1,y1,caxspecified);

Error in ==> interface>graphe_vitesse at 1477
  hplot = plotyy(handles.axes_vitesse,d1,vm1,'b',d1,gear,'g');%Courbe
 
??? Error while evaluating uicontrol Callback
J'ai transformé mon code comme ci dessous simplement:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
handles = guidata(gcbf);
hplot = get(hObj,'UserData');
if isempty(hplot)
 
  hplot = plotyy(handles.axes_graphe2,d1,A,'b',d1,B,'g');%Courbe
  hold(handles.axes_graphe2,'on')
  grid(handles.axes_graphe2,'on')
  set(hObj,'UserData',hplot);
Merci