필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

contourlines in time format

조회 수: 2 (최근 30일)
Staffan
Staffan 2012년 4월 23일
마감: MATLAB Answer Bot 2021년 8월 20일
how can I format my contour lines with clabel in time format like hh:mm?

답변 (2개)

Grzegorz Knor
Grzegorz Knor 2012년 4월 23일
It may be helpful to Analyze this code:
Z = 5+abs(peaks)/10;
[C,h] = contour(interp2(Z,4));
th = clabel(C,h);
set(th,'BackgroundColor',[1 1 .6],...
'Edgecolor',[.7 .7 .7])
for k=1:length(th)
tmp = get(th(k),'String');
tmp = strrep(tmp,'.',':');
set(th(k),'String',tmp)
end

Staffan
Staffan 2012년 4월 23일
It's not quite what I wanted. My contour lines are in decimal form, like 0.125 If I make cellstr(datestr(0.125,15)) then I get 3:00 which is what I want to be labelled along one of the lines.

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by