Title causes error when trying to plot graph
조회 수: 15 (최근 30일)
이전 댓글 표시
For some reason my code won't put a title on the axes. I get the error:
Attempted to access title(104); index out of bounds because
numel(title)=6.
Error in DisplayShift_Fluorescence (line 41)
title('h');
plot(AverageCalibrated(1:32,9),AverageCalibrated(1:32,10))
hold on
plot(AverageNonCalibrated(1:32,9),AverageNonCalibrated(1:32,10),'r')
legend('Calibrated','NonCalibrated')
xlabel('Wavelength')
ylabel('Intensity')
title('h');
댓글 수: 0
채택된 답변
Sean de Wolski
2012년 11월 8일
That means you have a variable named title
which title
whos title
To resolve it clear or rename that variable:
clear title
댓글 수: 6
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Labels and Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!