%% Write Matrix Starting at Offset
% Write a matrix to a file starting at a defined offset position.
% Create an array of sample data M.

M = magic(3)

% Define the starting offsets to skip one row and two columns.

row = 1 ;
col = 2 ;

% Write matrix M to the file 'myFile.txt', starting at the offset position.

csvwrite('myFile.txt',M,row,col)

% View the data in the file.

type('myFile.txt')

%
% Copyright 2012 The MathWorks, Inc.