MATLAB: How can i write a matrix into a single row of excel sheet

matrix into row

how can i write a matrix into a single row of excel sheet? lets say, i have a matrix of 10*2 and i have to write this matrix in excel as A1 to T1. please help me out as early as possible.i am supposed to make a feature file in excel using the features extracted from a image in a matrix.

Best Answer

Simply reshape your matrix into a row vector before passing it to xlswrite:
xlswrite(filename, reshape(yourmatrix, 1, []), sheetname, 'A1')