axes displays two vector values

hi, i have a problem with axes in gui, when i debugging that axes it shows two vector values. how can i proceed when it shows error in that........ pls give any idea...

댓글 수: 4

Walter Roberson
Walter Roberson 2011년 6월 28일
Please copy the relevant code and the error message.
ram
ram 2011년 6월 28일
figure(handles.axes1)
hgload('nfilename6.fig')
but i have this function,when i debugging at axes1 it shows
??? Error using ==> figure
Single input must be an existing figure handle or a scalar integer from 1 to
2147483646 like this,at the same time it shows two vector values... what can i do ?
Walter Roberson
Walter Roberson 2011년 6월 28일
Are you saying that handles.axes1 is a vector with two values? If so then likely what-ever code you used to assign to handles.axes1 is wrong, but we would have to see that code to tell you what to do.
ram
ram 2011년 6월 28일
sir, i didnt write a code for it. but it shows two vector values, how do i find that value assigned for handles.axes1.......

답변 (1개)

Walter Roberson
Walter Roberson 2011년 6월 28일

0 개 추천

plotyy() returns two axes values as its first output.
Did you perhaps do an assignment such as
h = plot(Y);
If you did, then h would not be an axes handle; it would be a vector of lineseries handles.

댓글 수: 3

Walter Roberson
Walter Roberson 2011년 6월 28일
figure() must be given a figure number, not an axes handle. You cannot create a figure inside of an axes. You can, though, load the figure, locate the axes in the newly loaded figure, copy the children of the axes to the existing axes, and then throw away the temporary figure that was created.
Try this:
newfig = hgload('nfilename6.fig');
figaxes = findobj(newfig,'type','axes');
copyobj(allchild(figaxes(1)), handles.axes1);
delete(newfig);
ram
ram 2011년 6월 28일
sir,'handles.axes1', it shows two vector values , how it assigned, its the problem...
Walter Roberson
Walter Roberson 2011년 6월 28일
Sorry, you will have to search the code to figure out how it is assigned. handles.axes1 can be assigned different things in different programs, so we do not know what it is in your program.

이 질문은 마감되었습니다.

태그

질문:

ram
2011년 6월 28일

마감:

2021년 8월 20일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by