spdiags command not working

>> 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.

 Risposta accettata

Steven Lord
Steven Lord il 3 Mag 2017

0 voti

Remove the curly braces from around the 2 at the end of your statement.

2 Commenti

nandine
nandine il 3 Mag 2017
But than i get this error
nandine
nandine il 3 Mag 2017
Actually your suggestion worked! Thank you!

Accedi per commentare.

Più risposte (0)

Categorie

Community Treasure Hunt

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

Start Hunting!

Translated by