Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

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

1 vue (au cours des 30 derniers jours)
utsav kakkad
utsav kakkad le 12 Mar 2019
Clôturé : MATLAB Answer Bot le 20 Août 2021
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.

Réponses (0)

Cette question est clôturée.

Produits


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by