How to remove this error?

1 回表示 (過去 30 日間)
Nisar Ahmed
Nisar Ahmed 2021 年 2 月 18 日
回答済み: the cyclist 2021 年 2 月 18 日
Error using plot
Vectors must be the same length.
Error in Well16_1_A_06 (line 263)
plot(Out(:,1),regtime,'k');
While the length of remtime is 926 and length(Out) = 765
  1 件のコメント
Nisar Ahmed
Nisar Ahmed 2021 年 2 月 18 日
length(regtime) = 926

サインインしてコメントする。

回答 (1 件)

the cyclist
the cyclist 2021 年 2 月 18 日
We can't really answer that for you, because we need more information.
Suppose
x = [1 2 3 4];
y = [5 6 2 3];
If I want to plot x vs. y, we have a clear one-to-one correspondence between each (x,y) pair. MATLAB knows what to plot.
But now suppose
x = [1 2 3 4 5 6 7];
y = [5 6 2 3];
Now, it is not clear how to plot x vs. y. How do we make the correspondence between x and y? We need more information.
Similarly, for your problem, we don't know how to make the correspondence between your 926 values and your 765 values, without more information.

カテゴリ

Help Center および File Exchange2-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