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!