Problem on code while plotting a graph

2 次查看(过去 30 天)
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 个评论
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.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

标签

产品


版本

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by