0
私はMatlabの初心者で、私は構造解析クラスの宿題をしています。様々な構造部材のジョイント(ノード)。だから私はこのコードを作った。入力値と '代入は非シングルトンの添え字よりも非シングルトンrhsの次元が多い' Error
%% Coordinates for Structure Nodes
Nnodes=input('Enter structure nodes\n');
Coords=zeros(Nnodes,3);
for i = 1:Nnodes
Coords(i,1)= i;
Coords(i,2)= input(['x coordinate of node', num2str(i),' = '],'s');
Coords(i,3)= input(['y coordinate of node', num2str(i),' = '],'s');
end
fprintf('These are the structure coordinates\n');
Coords
iは0から9の範囲のxとyの座標を入力すると、このコードは、動作iは座標> = 10を入力したら、しかし、それは
Assignment has more non-singleton rhs dimensions than non-singleton subscripts