Plot two columns from a table error
古いコメントを表示
plot( t.x, t.y );
Output:
Error using plot
Too many input arguments.
Where t.x and t.y are 50000x1 double
回答 (1 件)
What do these next 2 lines show in your command window?
whos t
which -all plot
x = [1:5000]';
y = sin(2 * pi * x / 1000);
t = table(x, y)
plot(t.x, t.y); % See No error if you do it right.
4 件のコメント
Niko
2023 年 5 月 31 日
Image Analyst
2023 年 5 月 31 日
Too bad you didn't use "which" like I said. You must have had your own version of plot that you defined somehow. When you restarted MATLAB you didn't define your own version that time and so it used the default buil-in version of plot(), which works.
Niko
2023 年 6 月 1 日
Image Analyst
2023 年 6 月 1 日
Yeah, that all looks fine. They're just overloaded versions of plot. But you don't want to see something like
c:\users\NIKO\Documents\matlab\work\plot.m
which is some version of your own creation.
カテゴリ
ヘルプ センター および File Exchange で Discrete Data Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
