% dat2mat:  (dat2mat.c, dat2mat.m, savematuss.c)        Steve Mann: 1992 Aug 12
%
% converts datfile to uss (smallest format Matlab understands), and loads
%
% Usage:   A = dat2mat('/radio/steve/perspectivepics/green');

function data = run_c_code_then_transpose(datfilename);  % returns matrix

% eval(sprintf('!ls'))    % just testing the sprintf and eval combination

disp(datfilename)

% eval([sprintf('!dat2mat ') sprintf(datfilename) ' deleteme_dat2mat.mat'])
s = ['!dat2mat ' datfilename ' deleteme_dat2mat.mat']
eval(s)

load deleteme_dat2mat  %  filename = deleteme_dat2mat
                       %  variable name in the file = deleteme_dat

% transpose 
data = deleteme_dat.';    % ``name'' in dat2mat.c is deleteme_mat

