I have a program which gives its answer in a command window as 400000 values in a single column and I need to run the same program 100 times. Hence that window data needs to save in 100 excel lines and each will get 400000 raw.

Now I want to know is it possible to save/store MATLAB command window data (displayed data) as an Excel file? This can reduce time otherwise I need to run this code 100 times and by copy and paste I need to generate the Excel file.

please see sample matlab code:

clc

clear

disp ('result')

for i=1:10

i=10+i;

rand;

disp(rand);

end

and required result excel sample file is for four run is displayed below

result result result result

0.1183 0.5298 0.0537 0.4021

0.8388 0.5004 0.3855 0.6397

0.249 0.9248 0.0133 0.6769

0.1758 0.7826 0.2807 0.7949

0.1975 0.2909 0.1522 0.8173

0.1744 0.9097 0.535 0.7545

0.5815 0.5147 0.3985 0.8499

0.2362 0.0762 0.396 0.0331

0.7287 0.3873 0.1991 0.1895

0.1929 0.7712 0.9295 0.7071

>> >> >> >>

More Ghanshyam G. Tejani's questions See All
Similar questions and discussions