Q:

Create a multiplication table and write it to a spreadsheet

0

 Create a multiplication table and write it to a spreadsheet. 

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Ch9Ex4.m

% Write a multiplication table to a spreadsheet

%Initialize multiplication table

mat = zeros(101,101);

mat(1,2:end) = 1:100; %Row header

mat(2:end,1) = 1:100; %Column header

%Create multiplication table

for i = 1:100

 for j = 1:100

 mat(i+1,j+1) = i*j;

 end

end

xlswrite('multable.xls', mat)

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now