MATLAB: Creating a .res with 2 variables side by side (2 columns)

column .res

hello… how do i create a .res file with two variables side by side?
ex:
X = 1
2
3
4
 
Y =
1
2
3
4
column 1: colum2:
1                    1
2                    2
3                    3
4                    4
thx!

Best Answer

If your .res file is a basic text file, you can proceed as follows
dlmwrite( 'myFile.res', [X,Y], 'delimiter', ' ' )