Can you vectorize this code?
古いコメントを表示
This comes from the Matlab book and I'm having the hardest time understanding it.
Chapter 5, problem 35
Vectorize this code:
n = 3;
x = zeros(n);
y = x;
for i = 1:n
x(:,i) = i;
y(i,:) = i;
end
Please help!
採用された回答
その他の回答 (1 件)
Azzi Abdelmalek
2014 年 4 月 15 日
編集済み: Azzi Abdelmalek
2014 年 4 月 15 日
0 投票
カテゴリ
ヘルプ センター および File Exchange で Resizing and Reshaping Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!