필터 지우기
필터 지우기

Problem on code while plotting a graph

조회 수: 1 (최근 30일)
Angus Wong
Angus Wong 2018년 6월 19일
댓글: Star Strider 2018년 6월 19일
I am plotting a graph, with the line:
figure;
hold on ;
.....
title('function');
.....
hold off;
But I ended up with an error of "Index exceeds array bounds." on the title line. How can I solve this?
  댓글 수: 4
Angus Wong
Angus Wong 2018년 6월 19일
편집: Angus Wong 2018년 6월 19일
2018a
Paolo
Paolo 2018년 6월 19일
편집: Paolo 2018년 6월 19일
Star Strider is right, the error is probably not related to the title command.

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

채택된 답변

Star Strider
Star Strider 2018년 6월 19일
편집: Star Strider 2018년 6월 19일
The actual error is most likely in the line just above your title call.
Check it to be certain it is entered correctly.
EDIT (16:10 UCT)
What is your ‘y’ function?
Note that in your code, and using fplot, ‘y’ must be a function of one variable.
  댓글 수: 4
Angus Wong
Angus Wong 2018년 6월 19일
Thanks guys, I know where I made the mistake.
Star Strider
Star Strider 2018년 6월 19일
As always, my (our) pleasure.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

태그

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by