spdiags command not working

2 次查看(过去 30 天)
>> 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.

采纳的回答

Steven Lord
Steven Lord 2017-5-3
Remove the curly braces from around the 2 at the end of your statement.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Sparse Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by