ignoring return value syntax?

爱⌒轻易说出口 提交于 2019-12-01 06:16:17

This syntax was just introduced in one of the latest versions. So there is no expectation that Octave would match that feature.

Your alternatives are effectively to introduce dummy variables in some form. Here are the common choices used before ~ became an option.

[colA, colB, colC, colC] = textread('data.txt', '%d %d %s %d', 1);
[colA, colB, ans, colC] = textread('data.txt', '%d %d %s %d', 1);

I like the latter, as ans is what matlab uses anyway as a bit bucket.

This feature was introduced in Octave 3.4. So the code should work with current builds of Octave.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!