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];
0 个评论
采纳的回答
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!