根据参数更改Matlab中的文件名 [英] Change filename in Matlab based on parameter

查看:52
本文介绍了根据参数更改Matlab中的文件名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友,



我想为不同的人运行我的代码。我为每个人提供了一个号码以保存结果。



如何通过更改一个参数来更改文件名,以避免在多个位置更改文件名。

代码在这里:

Dear freinds,

I want to run my codes for different persons. I dedicated a number to each person to save the results.

How can i change the filenames by changing one parameter, to avoid changing the filename several places.
The code is here:

patient_num = 2;
ImagesOutputPath = fullfile([MyFilesPath,'\ImagesOutput_P_2']);
save segmented_img_P_2.mat Segmented_img
save volume_P_2.mat volume
save time_P_2.mat tEnd



非常感谢


Thank you alot

推荐答案

使用 sprintf [ ^ ]生成文件名字符串的函数。
Use the sprintf[^] function for generating your filename string.


这篇关于根据参数更改Matlab中的文件名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆