Info

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

Unable to perform assignment since the left & right sides have a different number of elements.

1 回表示 (過去 30 日間)
utsav kakkad
utsav kakkad 2019 年 3 月 12 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Why am I getting the error above assigning a scalar to an array element? We do that regularly in programming languages.
is it something that I have missed?
Further, this problem occurs because the size of the sum array is 300X300.
Just tell me how do I get the size of this array to 1X300 & then we'll all be done.
I'm doing this in my code:
for i=1:1:n
if(S(i).E>0)
sum=sum+S(i).E;
end
end
avg=sum/n-Eo;
average(r1)=avg;
please note that this is the inner part of an enourmous r1 outerloop. the maximum value of r1(number of rounds) is 300. The number of sensor nodes that I'm using is 300. I can post my codeif needed.

回答 (0 件)

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by