Vectorize nested for loops
古いコメントを表示
Hello everyone.
I'd like to vectorize this code:
for i = 1:N-2
for j = 1:N
Jacobian(i,j) = D2Mat(i+1,j)+(2/XCheb(i+1))*...
D1Mat(i+1,j)+(xi^2)*n*Y(i+1)^(n-1)*D0Mat(i+1,j);
end
end
where D2Mat is (NxN), XCheb is (N,1), D1Mat is (NxN), D0Mat is (NxN), Y is (N,1) and xi, n are real values.
Thanks
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Dimensionality Reduction and Feature Extraction についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!