Help with matlab, dimensions of matrices being concatenated are not consistent, why?

3 ビュー (過去 30 日間)
Josh Hunt
Josh Hunt 2015 年 9 月 4 日
編集済み: Cedric 2015 年 9 月 4 日
I keep getting this error, Dimensions of matrices being concatenated are not consistent.
Here's my code:
x = [0.00, 100.00, 200.00];
y1 = [100.00, 138.50, 175.83];
y2 = [(175.83/200) * x];
y3 = [(y1) / x];
[hAx,hLine1,hLine2] = plotyy(x,y1,[x',x'],[y2',y3']);

採用された回答

Cedric
Cedric 2015 年 9 月 4 日
編集済み: Cedric 2015 年 9 月 4 日
Seeing what you are trying to do in the call to plot, I suspect that you didn't want to solve a linear system when you defined y3, but wanted instead an element-wise division?
y3 = y1 ./ x ;

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by