フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

help with error in coding

1 回表示 (過去 30 日間)
Duncan
Duncan 2014 年 8 月 15 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I have a for loop which continually assigns values into a cell array and i keep getting an error. "Subscripted assignment dimension mismatch."
the correct values come up for the first two "m" values but an error shows when its running for "m = 3"
here is the code for that error:
for m = 1:1:3
for n = 1:1:3
B = A((A(:,1) - C{2,m}(n,1)).^2 + (A(:,2) - C{2,m}(n,2)).^2 == C{1,m}(1,1)^2,:);
D{1,m}(n,:) = B;
end
end

回答 (1 件)

Iain
Iain 2014 年 8 月 15 日
Change D{1,m}(n,:) = B;
To:
D{1,m}{n} = B;

この質問は閉じられています。

製品

Community Treasure Hunt

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

Start Hunting!

Translated by