function X = jvdmatrixRead(filename) %JVDMATRIXREAD Reads a file formatted as a jvdmatrix. % % Arguments: % filename name of file to read and parse % % Returns: % X the matrix as parsed from the file % % Authors: % Joshua V. Dillon; Feb. 11, 2006; jvdillon AAT purdue DDOT edu %if nargin==1 % floatfmt = '%.16g'; %end fd = fopen(filename,'r'); dimen = fscanf(fd,'%d %d',2); X=textscan(fd,'%n'); X=reshape([X{:}],dimen(1),dimen(2)); fclose(fd);