I need to convert a data file into ppm/png/any other format using Matlab ? I have a data file having one column and 250000 rows of integer numbers, ranging from 0 to say 5. Data (say) in file are as follows:
2
1
0
5
2
1
3
.
.
.
0
5
1
4
I want to write these data into a image file say ppm, jpeg or any other format, how can I do it using Matlab ?