I get the following error "Dimensions of arrays being concatenated are not consistent."

1 回表示 (過去 30 日間)
w20=[2.22939364554e-13,4.39934099226e-10,1.08606937077e-7,
7.8025564785e-6,0.000228338636017,0.00324377334224, 0.0248105208875,
0.10901720602,0.286675505363,0.462243669601,...
0.462243669601,0.286675505363,0.10901720602,0.0248105208875,
0.00324377334224,0.000228338636017,7.8025564785e-6,
1.08606937077e-7,4.39934099226e-10,2.22939364554e-13];
x20=[-5.38748089001,-4.60368244955,-3.94476404012,
-3.34785456738,-2.78880605843,-2.25497400209,-1.73853771212,
-1.2340762154,-0.737473728545,-0.245340708301,...
0.245340708301,0.737473728545,1.2340762154,1.73853771212,
2.25497400209,2.78880605843,3.34785456738,3.94476404012,
4.60368244955,5.38748089001];

採用された回答

Alex Mcaulley
Alex Mcaulley 2020 年 2 月 26 日
Are you defining row vectors? Use ... in each line
w20=[2.22939364554e-13,4.39934099226e-10,1.08606937077e-7,...
7.8025564785e-6,0.000228338636017,0.00324377334224, 0.0248105208875,...
0.10901720602,0.286675505363,0.462243669601,...
0.462243669601,0.286675505363,0.10901720602,0.0248105208875,...
0.00324377334224,0.000228338636017,7.8025564785e-6,...
1.08606937077e-7,4.39934099226e-10,2.22939364554e-13];
x20=[-5.38748089001,-4.60368244955,-3.94476404012,...
-3.34785456738,-2.78880605843,-2.25497400209,-1.73853771212,...
-1.2340762154,-0.737473728545,-0.245340708301,...
0.245340708301,0.737473728545,1.2340762154,1.73853771212,...
2.25497400209,2.78880605843,3.34785456738,3.94476404012,...
4.60368244955,5.38748089001];
If they are matrix each row must have the same number of columns

その他の回答 (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