Matlab,文件夹中的高级循环和应用函数
我编写了一段代码来分析视频文件,然后将数据绘制在图表上 将此图保存到 excel 和 jpg。
但我的问题是,我在大约 20 个文件夹中有超过 200 个视频需要分析,
因此我需要自动执行此代码以在文件夹内循环并分析其中的每个 *.avi 文件,并且
..所以任何想法或建议
非常感谢您的帮助
< strong>我需要知道如何循环文件夹并获取其中的文件,并对该文件夹中的这些文件应用函数
请注意,我的函数我也想将图形结果保存到 img,那么我应该包含完整的函数吗?保存时的路径?我该怎么做?
i wrote a code that analyze a video file and then plot data on a graph then
save this graph into
excel and jpg.
but my problem is that i have more than 200 video to analyze in around 20 folder,
so i need to automate this code to loop inside folders and analyze each *.avi file inside and
.. So any ideas or suggestions
Really appreciate your help
I need to know how to loop folders and get files inside and the apply a function to these files in that folder
Please note that my function that i also want to save graph result to img, should i then include full path while saving ? and how can i do it ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
dir
和fullfile
命令就是您所需要的。根据您的目录结构,如下所示:The
dir
andfullfile
commands are what you need. Depending on your directory structure, something like this: