symsum is slow
古いコメントを表示
Why is "symsum" so slow?
>> syms k
>> x2 = -.5:.5/1000:.5;
>> fun(k) = exp(-((((k-1)*x2).^2)/.01));
>> tic; p = symsum(fun(k),k,-1,1); toc; % almost 5 seconds
>> tic; p = fun(-1)+fun(0)+fun(1); toc; % about 1 second
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Mathematics についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!