Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

textscan undefined in Octave

fid = fopen('data/data_file.csv');
all_messages = textscan(fid, format, 'delimiter', ',');

Returns:

error: 'textscan' undefined

How do you fix this?

like image 613
B Seven Avatar asked Aug 17 '26 00:08

B Seven


1 Answers

Core answer

The textscan function was added to Octave in version 3.4.0, which was released in February 2011. Your best option, then, is to install a newer version of Octave. If, for some reason, that is not an option you could try using fscanf (as suggested here).

History

The textscan function is not mentioned in the new function list in the version 3.4 release news, but textscan.m is not present in the version 3.2.4 distribution.

It appears to have been added as a result of this ticket (scroll to the bottom of the ticket), which was created as a result of this request.

like image 165
David Alber Avatar answered Aug 20 '26 18:08

David Alber



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!