Octave 中的 textscan 未定义
fid = fopen('data/data_file.csv');
all_messages = textscan(fid, format, 'delimiter', ',');
返回:
错误:“textscan”未定义
如何解决此问题?
fid = fopen('data/data_file.csv');
all_messages = textscan(fid, format, 'delimiter', ',');
Returns:
error: 'textscan' undefined
How do you fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
核心答案
Octave 3.4.0 版本中添加了
textscan
功能,该版本于 2011 年 2 月发布。那么,您最好的选择是安装较新版本的 Octave。如果由于某种原因,这不是一个选项,您可以尝试使用fscanf
(按照建议 此处)。历史
版本 3.4 发布消息,但
textscan.m
不存在于版本 3.2.4 发行版中。它似乎是由于此票证而添加的(滚动到底部票证),这是由于 此请求。
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 usingfscanf
(as suggested here).History
The
textscan
function is not mentioned in the new function list in the version 3.4 release news, buttextscan.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.