I have a for loop, I want to write the array generated in the for loop into a csv file.
for k = 1 : numberOfImagesToProcess
array1=…. (This is a one dimenial array)
end
For example, if the array1 generated in the first iteration is 1 2 3 and array1 generated in the second iteration is 4 5 6, I want to get csv file in the following format:
1 2 34 5 6
However, I tried to use csvwrite('csvlist.dat',array1) inside the for loop I get:
456
The result of first iteration is overwrote by the second iteration…
Thanks!
Best Answer