Filter löschen
Filter löschen

Index problem help?

1 Ansicht (letzte 30 Tage)
JL555
JL555 am 22 Sep. 2015
Bearbeitet: JL555 am 23 Sep. 2015
for i=1:n
for j=1:n
Pl=P(i)*B(i)(j)*P(j);
seems like i'm getting error with writing B(i)(j)...How will i code it in another way?

Akzeptierte Antwort

Guillaume
Guillaume am 22 Sep. 2015
Bearbeitet: Guillaume am 22 Sep. 2015
Possibly, you meant to write
Pl(i,j) = P(i)*B(i,j)*P(j)
Or possibly, you meant something else entirely. It's impossible to tell with so little information.
In any case, you should go through the Getting Started tutorial.
Most likely also, the loops are not needed and it can all be done with matrix operations.
  17 Kommentare
Walter Roberson
Walter Roberson am 22 Sep. 2015
I am not familiar with economic load dispatch.
Note: I am not "dude". Or "man".
JL555
JL555 am 23 Sep. 2015
Bearbeitet: JL555 am 23 Sep. 2015
ok ..anyway thanks for your help really appreciate it.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by