I have 2 matrices, with one having floating point numbers and the other, integer numbers. Both the matrices have the same number of rows but different number of columns.
I want to write both the matrices together to a file with each single line consisting of a single row from each matrix printed side-by-side.
How should I do this?
My try (unsuccessful) :
fid = fopen(nameF, 'w'); % Open for writing
fprintf('%d\n',fid);
for i=1:size(FloatMat,1)
fprintf(fid, '%f %d ', FloatMat(i,:),IntMat(i,:));
fprintf(fid, '\n');
end
fclose(fid);
fprintf(fid, '%f %d ', FloatMat(i,:),IntMat(i,1:end-1)); fprintf(fid, '%d\n', IntMat(i,end));- DanFloatMat(asfloattype) and then all the columns ofIntMat(asinttype).repmatsolved the issue for me. - creativesol