How to use xlswrite

Dear all
I made three loops using P1,P2 and P3, where these values appear in a Matrix A in the loops:
for i=15:imax
for j=20:jmax
for k=25:kmax
A= [ 1 i 100
10 j 14
3 k 16];
b= function (i,j,k) %b can be calculated from a long process, but for each (i,j,k), we have a unique value of b
end;
end;
end;
My question is how I can have an excel file using xlswrite, displaying in each row in the same sheet the values of i, j, k and corresponding b. Thanks a lot

 Accepted Answer

Lanina
Lanina on 20 Mar 2013

0 votes

thanks a lot. This is what I was looking for.
It works. Great!

2 Comments

Lanina
Lanina on 20 Mar 2013
thanks. This is exactly what I was looking for. It works. Great!
You should not accept your answer, which is in fact a comment

Sign in to comment.

More Answers (1)

jj=0
for i=15:imax
for j=20:jmax
for k=25:kmax
jj=jj+1
b= function (i,j,k)
out(jj,1:4)=[i j k b];
end;
end;
end;
xlswrite('yourfile.xls',out)

Tags

Asked:

on 19 Mar 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!