Link to home
Start Free TrialLog in
Avatar of jtiernan2008
jtiernan2008

asked on

Can someone please help with this simple Matlab question

Question is;

Create a (10 by 10) matrix initialized to all zeros.
Input the numbers 1 to 100 using 2 nested for loops.

my attempt is in the codebox below

Can someone please advise?
Z=zeros(10,10);
count=0;
for x = 1:10
    for y = 1:10
        Z(x,y)=count+1;
    end
end
        Z

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of yuk99
yuk99
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial