From: Jane W. on
Hi everyone,

I am a beginner and I have a question on the handles structure in GUI.

I have made an axes where plot would be shown, and to set the xlimit, I used the following code.

xlim(handles.axes2,[handles.x(1) handles.x(end)])

next, i want to plot 2 curves on handles.axes2, so I used:

[AX, H1, H2] = plotyy (handles.x, handles.right, handles.x,left);

the x- limit of the two curves doesn't line up. Then, I add

xlim(H2,[handles.x(1) handles.x(end)])

but there is an error:

??? Error using ==> xlim at 30
Wrong number of arguments

Error in ==> twotest>slider1_Callback at 138
xlim (H2, [handles.x(1) handles.x(end)])

I have no clue how to solve this problem, and I don't understand why it is a "wrong number of arguments." Is it because H2 is a structure within handles.axes2?

Have I made myself clear? Could anyone suggest a solution to this?

Thanks,
j