如何传递像这样的单元格数组
pathParts = {'D:', 'foo', 'matic'}
到fullfile以获取完整路径(即D:\foo\matic)?
fullfile
D:\foo\matic
发布于 2020-11-25 17:17:46
如下所示:
fullfile(pathParts{:})
通过对单元格数组进行冒号索引,MATLAB将返回一个comma separated list。然后,您可以轻松地将其传递给其他函数。
https://stackoverflow.com/questions/65001557
相似问题