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

0 投票

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

2 件のコメント

nandine
nandine 2017 年 5 月 3 日
But than i get this error
nandine
nandine 2017 年 5 月 3 日
Actually your suggestion worked! Thank you!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeOperating on Diagonal Matrices についてさらに検索

質問済み:

2017 年 5 月 3 日

コメント済み:

2017 年 5 月 3 日

Community Treasure Hunt

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

Start Hunting!

Translated by