Why can't I use the plot function properly?

A few minutes ago, everything was as usual.It came all of a sudden, and I don't thing I did anything related with the plot function:
>> plot(a)
Subscript indices must either be real positive integers or logicals.
>> bar(a)
>> area(a)
>> bar([1,2])
>> plot([1,2])
Index exceeds matrix dimensions.

 采纳的回答

You most likely have a variable that you named ‘plot’.
Run this line:
which plot -all
If the first line in the output is:
plot is a variable.
you found the problem. The solution is to rename the variable.

2 个评论

You are brilliant. Don't even remember why I did something like that. Thanks a lot!
Thank you!
As always, my pleasure!

请先登录,再进行评论。

更多回答(0 个)

类别

在 帮助中心 和 File Exchange 中查找有关 2-D and 3-D Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by