Clear Filters
Clear Filters

spdiags command not working

2 views (last 30 days)
nandine
nandine on 3 May 2017
Commented: nandine on 3 May 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.

Accepted Answer

Steven Lord
Steven Lord on 3 May 2017
Remove the curly braces from around the 2 at the end of your statement.
  2 Comments
nandine
nandine on 3 May 2017
Actually your suggestion worked! Thank you!

Sign in to comment.

More Answers (0)

Categories

Find more on Sparse Matrices in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!