0
내가 { 'foo는' '바'}에 [1 2.2]을 추가하고 얻으려고 :추가] NX 1 벡터 NX 1 세포 배열
'foo' 'ba'
1 2.200000
를 내가 거의 다 해요 :
>> A = {'foo' 'ba'}
A =
1×2 cell array
'foo' 'ba'
>> b = [1 2.2]
b =
1.000000000000000 2.200000000000000
>> [A;b]
Error using vertcat
Dimensions of matrices being concatenated are
not consistent.
>> [A;num2cell(b)]
ans =
2×2 cell array
'foo' 'ba'
[ 1] [2.200000000000000]
[]를 제거하는 방법?
제대로하고 있습니다. Matlab에서'1'과'[1]'은 정확히 똑같습니다 ('isequal (1, [1]) '로 확인하십시오) –