2 つの軸があります。1 つは画像を表示するためのもので、もう 1 つはグラフをプロットするためのものです。Error using plot. A numeric or double convertible argument is expected
データをプロットする軸を指定しようとすると、このエラーが発生しますplot(handles.axis,curve,x,y)
。
figure
handles.axis = gca;
x = 1:10;
y = 1:10;
curve = fit(x',y','linearinterp');
plot(curve,x,y) % works fine
plot(handles.axis,curve,x,y) % doesn't work
plot(curve,x,y,'Parent',handles.axis) % doesn't work
この例を Matlab に貼り付けて試すことができます。軸を指定するためにコードをどのように修正できますか?