Problem on code while plotting a graph

10 ビュー (過去 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 Center および File Exchange2-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