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 CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by