How do you find the 10 entry in this program
Show older comments
How do you find the 10 entry in this program
myMatrix = zeros(6,4);
for i = 1:6
for j = 1:4
myMatrix(i,j) = i+j;
end
end
Answers (1)
KSSV
on 19 Apr 2020
MATLAB stores arrays in column-wise. You can get 10th element using
iwant = myMatrix(10) ;
Categories
Find more on MATLAB 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!