simplified testing

This commit is contained in:
Mark Borgerding
2003-08-13 01:54:58 +00:00
parent 1cd00ce9f5
commit 4add8dbbb6
3 changed files with 80 additions and 0 deletions

16
test/filesave.m Executable file
View File

@ -0,0 +1,16 @@
function filesave( fname , prec , data )
f = fopen(fname,"w", "native");
len=length(data);
if is_complex(data),
flat=zeros(1,2*len);
flat(1:2:2*len) = real(data);
flat(2:2:2*len) = imag(data);
data = flat;
endif
fwrite(f,data,prec);
fclose(f);
endfunction