Please suggest vectorization options for following code??
古いコメントを表示
for Pos=3:1000
a_i_i(Pos:end,Pos)=a_sub(1:(end-Pos+2));
end
4 件のコメント
Guillaume
2017 年 5 月 1 日
Rather than letting us figure out what your code does why don't you tell us?
Also, what is the content/size of a_i_i before the loop?
John D'Errico
2017 年 5 月 1 日
When you merely post completely undocumented code that you want to see vectorized, someone needs to first reverse-engineer your code. They need to thoroughly understand the code, what it does, why you are doing it. Then they need to find a way to do it more efficiently.
By explaining what you want the code to do, you help the person who might help you. That makes it easy for them to solve, as well as more likely that you will get a useful and timely response.
Parag Patil
2017 年 5 月 1 日
Guillaume
2017 年 5 月 1 日
Well, isn't that what my answer provides?
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
