???if there are only numbers in the file.
2) x=dlmread('file.dat',[1 0 20 3]);
???if you will read only the first 4 columns
???and the rows until rows 21 without the
3) [z1 z2]=textread('file.dat','%s %s');
???if there are two columns. letters are
???allowed in the file.
4) the most generalized possibility you
???have with fopen/fgetl commands, which
???allows you to read formatted files.
??if ~ischar(s), break, end
In (1)-(3) the data in the file must be delimitered, whereas in (4)
the data must be presented in a fixed structure. All above are
examples for special numbers of columns/ rows and formatted datas,
resp., which you have to modify to your data structure. However, with
this commands you will find enough help in Matlab.
> how can i read a file .dat with matlab?
I want to convert some .mat files into .dat files. Does anyone know
any Matlab functions that can do this?
Thanks in advance.