【发布时间】:2025-12-26 10:00:16
【问题描述】:
Octave 有让用户选择输入文件的好方法吗?我在 Matlab 中看到过这样的代码,但在 Octave 中不起作用。
首选基于 gui 的方法,但也可以使用某种命令行选择。如果有某种方法可以在 Matlab 和 Octave 中工作,那就太好了。
我为 Matlab 找到了this,但它在 Octave 中不起作用,即使您为 listdlg 函数安装了Octave Forge Java 包。在 Octave 中,dir() 为您提供:
647x1 struct array containing the fields:
name
date
bytes
isdir
datenum
statinfo
但我不知道如何将其转换为 listdlg 期望的字符串数组。
【问题讨论】:
-
“好”就像在基于 GUI 的方法中一样?
标签: file openfiledialog octave