Can these operations be vectorized?
2 views (last 30 days)
Show older comments
X=1:100;
T=zeros(10);
for i=1:10
T(i,:)=X((1+(i-1)*10):(10*i));
end
Please tell me how to do these operations without using the FOR Loop.
1 Comment
Matt Fig
on 15 Oct 2012
Why did you use the Code button on your paragraph, but not on the code?? Please fix this.
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!