scanf into a cell variable

Ben Abbott bpabbott at mac.com
Sat May 31 09:58:37 CDT 2008


On May 30, 2008, at 4:19 PM, M Krieger wrote:

> I just inherited some Matlab code which uses textscan to get some  
> mixed data into a cell variable. How can I accomplish the same in  
> Octave without numerous fscanf calls? I would just do this, but the  
> code is pretty complex, with multiple loops and it would not be too  
> easy to call fscanf (or csvread) into matrixes and then put that  
> data into the cells (one data type after another).
>
> Thanks,
> Mark

There is a managed list of functions present in Matlab and missing in  
Octave.

	http://wiki.octave.org/wiki.pl?MissingMatlabFunctions

Unfortunately, textscan is one of the functions which is missing.

If you decide to write a function for your own purposes, or take on  
the larger task of writing a textscan function for Octave, the  
functions regexp.m and regexpi.m may be useful.

Ben


More information about the Help-octave mailing list