vector values

조회 수: 2 (최근 30일)
ram
ram 2011년 6월 29일
hi, how the vector values are assigned for axes in gui. If two vector values are assigned what we will do for that , in my program handles.axes should shows two integer values, how it assigned? how can i find that, pls. give any ideas....

답변 (2개)

Oleg Komarov
Oleg Komarov 2011년 6월 29일
Are you looking for the ticks on the X axis (their positions and labels)?
Then in general for a figure containing one axes:
% Retrieve values for X ticks from currently selected axes
axes
get(gca,{'Xtick','XtickLabel'}
% Set ticks and labels
set(gca,'Xtick',0:0.1:1,'XtickLabel',('A':'Z').')
  댓글 수: 1
Oleg Komarov
Oleg Komarov 2011년 6월 29일
I don't understand your problem. Try to rephrase/elaborate with clear english what you expect to happen and what you get.

댓글을 달려면 로그인하십시오.


Walter Roberson
Walter Roberson 2011년 6월 29일
filename = sprintf('nfilename%d.fig', handles.index);
fig = figure(handles.axes10);
hgload(filename,'Parent',fig);
But to answer your original question:
Vector values are NOT assigned to axes in GUIDE, at least not in any case I can think of.
In the section of code that you are seeing handles.axes10 as a vector, please try
for H = handles.axes10
fprintf('Handle %.25g Type %s Parent %.25g Parent Type %s\n', H, get(H,'Type'), get(H,'Parent'), get(get(H,'Parent'),'Type'));
end
and report back to us what the output is.

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by