Effacer les filtres
Effacer les filtres

spdiags command not working

2 vues (au cours des 30 derniers jours)
nandine
nandine le 3 Mai 2017
Commenté : nandine le 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.

Réponse acceptée

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

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Sparse Matrices dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by