Azzera filtri
Azzera filtri

Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 1-by-3.

178 visualizzazioni (ultimi 30 giorni)
Hi part of mi code is shown below:
for I = 1:10+1
w2(i,1)= w2(i,1)+n.*delta2.*Y1(i)
end
i am getting the error as mentioned in the title, can someone please help me
  4 Commenti
Stephen23
Stephen23 il 25 Ott 2018
Modificato: Stephen23 il 25 Ott 2018
It comes down to this:
w2(i,1)+n.*delta2.*Y1(i)
w2(i,1) refers to a sclar, as does Y1(i). So one (or both) of n and delta2 must be non-scalar. Check the sizes of your variables.

Accedi per commentare.

Risposte (1)

madhan ravi
madhan ravi il 25 Ott 2018
Modificato: madhan ravi il 25 Ott 2018
for i = 1:10+1
w2(i,:)= w2(i,1)+n.*delta2.*Y1(i)
end
  7 Commenti
madhan ravi
madhan ravi il 26 Ott 2018
Modificato: madhan ravi il 26 Ott 2018
Anytime , make sure to accept the answer if it worked so that other people know the question is solved else let know whats additionally required

Accedi per commentare.

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by