Filter löschen
Filter löschen

spdiags command not working

6 Ansichten (letzte 30 Tage)
nandine
nandine am 3 Mai 2017
Kommentiert: nandine am 3 Mai 2017
>> Dx=spdiags([e 2*e e], -1:1, Nx,Nx)/(dx)^{2}
Undefined operator '^' for input arguments of type 'cell'.
What is wrong with this line? cant figure it out.

Akzeptierte Antwort

Steven Lord
Steven Lord am 3 Mai 2017
Remove the curly braces from around the 2 at the end of your statement.
  2 Kommentare
nandine
nandine am 3 Mai 2017
But than i get this error
nandine
nandine am 3 Mai 2017
Actually your suggestion worked! Thank you!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Sparse Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by