input : transient.case

output: transient_1.case, transient_2.case, transient_3.case ...

************transient.case

FORMAT
type: ensight gold
GEOMETRY
model: solution.pval.unsteady_1.geo
VARIABLE
scalar per node: density   solution.pval.unsteady_*.density
vector per node: v   solution.pval.unsteady_*.v
scalar per node: pressure   solution.pval.unsteady_*.pressure
scalar per node: temperature   solution.pval.unsteady_*.temperature
TIME
time set: 1
number of steps: 1
filename start number:2
filename increment: 1
time values: 1.0319174484984 1.8385297551528

*******************

where, filename start number:2, 

is the same as filename

**************************code.m

n=10;
fileinfo = importdata('transient.case',';');
for i=1:n
filename=sprintf('transient_%d.case',i);
a=cell2mat(fileinfo(13));
idx=find(a==':');
fileinfo(13)=cellstr(strrep(a,a(idx+1:end),num2str(i)));
filePh = fopen(filename,'w');
fprintf(filePh,'%s\n',fileinfo{:});
fclose(filePh);
end
*****************

copy contents of file with variable number in Matlab的更多相关文章

  1. How to create functions that can accept variable number of parameters such as Format

    http://www.chami.com/tips/delphi/112696D.html Sometimes it's necessary to pass undefined number of [ ...

  2. Variable number of arguments (Varargs)

    A parameter of a function (normally the last one) may be marked with vararg modifier: fun <T> ...

  3. Solved Unable to copy the source file ./installer/services.sh to the destination file /etc/vmware-t

    Sometimes when you intall vmwaretools there will be some problems such as "Unable to copy the s ...

  4. ORA-19502: write error on file "xxxxx", block number xxxx

    错误现象: 在ORACLE 10g下为表空间IGNITE_EGVSQL01增加数据文件时,报如下错误: SQL> ALTER TABLESPACE IGNITE_EGVSQL01      AD ...

  5. MySQL_ERROR 1231 (42000) at line XX in file 'file_name' Variable 'time_zone' can't be

    类似的错误信息如下 ERROR 1231 (42000) at line 10370 in file: '/root/sql/ultrax_170322.dmp': Variable 'time_zo ...

  6. Lua 变长参数(variable number of arguments)

    lua变长参数 function add ( ... ) for i, v in ipairs{...} do print(i, ' ', v) end end add(1, 2, 'sdf') lu ...

  7. [翻译] Macros with a Variable Number of Arguments - GCC

    可变参数宏(Variadic Macro) 在1999年的ISO C标准中,可以声明一个像函数一样接受可变参数的宏.定义这种宏的语法与函数的定义相似.这是一个例子: #define debug(for ...

  8. EmWebAdmin 生成流程分析

    继上一篇的简略的说明 EmWebAdmin 的地址以后下载,生成之后,这一篇讲一下该模板的生成流程 // 上一篇地址: http://www.cnblogs.com/chenfulin5/p/6856 ...

  9. Visual Studio - File Properties (Build Action, Copy to Output Directory)

    Ref: MSDN (https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/0c6xyb ...

随机推荐

  1. 通过scp批量推送文件到远程目录

    [root@openfire1 script]# cat test.sh  #!/bin/bash   #通过scp推送文件到远程目录 for ip in `cat iplist`  do       ...

  2. Tool:安全狗

    ylbtech-Tool:安全狗 安全狗,互联网安全品牌,云安全服务与解决方案提供商 .企业用户遍布互联网金融.电商.游戏.移动互联网.政府单位等多个行业. 1.返回顶部 1.   2. 2.返回顶部 ...

  3. 【转载】sql索引存储结构

    一.引言 对数据库索引的关注从未淡出我的们的讨论,那么数据库索引是什么样的?聚集索引与非聚集索引有什么不同?希望本文对各位同仁有一定的帮助.有不少存疑的地方,诚心希望各位不吝赐教指正,共同进步.[最近 ...

  4. git期末总结(转载)

    转自:http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000/00137586810169 ...

  5. PCB MS SQL 存储过程(CLR) 实现Json转DataTable表的方法

    一.准备需转为DataTable的json字符串 原json字符串数据 [{"TechName":"ECN","TechNo":" ...

  6. A Few Words on Callbacks and Asynchronous Mechanism In Javascript

    It is said that the one of the most routine work a javascript programmer do is writing codes like &q ...

  7. [Swift通天遁地]五、高级扩展-(9)颜色、设备、UserDefaults、URL等扩展方法

    ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★➤微信公众号:山青咏芝(shanqingyongzhi)➤博客园地址:山青咏芝(https://www.cnblogs. ...

  8. ZOJ 3666 博弈 SG函数

    SG函数: 对于任意状态,定义SG(x)=mex(S),其中S是x的后继状态的SG函数值集合,mex(S)表示不再S内的最小非负整数 SG(X)=0当且仅当x为必败态. 解: 构造一个有向无环图(树) ...

  9. Spark 概念学习系列之Spark基本概念和模型(十八)

    打好基础,别小瞧它! spark的运行模式多种多样,在单机上既可以本地模式运行,也可以伪分布模式运行.而当以分布式的方式在集群中运行时.底层的资源调度可以使用Mesos或者Yarn,也可使用spark ...

  10. No operations allowed after connection closed--转

    https://www.jianshu.com/p/1626d41572f2 Spring boot的单数据源配置比较简单,只需要在application.properties配置相关的jdbc连接的 ...