I am working on producing tributary pixels input file to GAMS and I need them to be numbered in a way that distinguishes 1.1 from 1.10 and 1.100. Is there a way to print a string of characters distinguishing these differences?
The way I would like my txt file to be displayed is:
1.1,0..1.10,1,1.9a=num2str(tribarray(k).pixel,precision); fprintf(fid, '%s, %s, %s\n', a, num2str(size(tribarray(k).trib,2))); %,num2str(tribarray(k).trib));
%fprintf(fid, '%s, %s, %s\n', tribarray(k).pixel, size(tribarray(k).trib,2));
for j = 1:size(tribarray(k).trib,2) b=num2str(tribarray(k).trib(j)); fprintf(fid, '%s,', b);end
Thanks, Mariam
Best Answer