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. 为PhoneGap写一个android插件

    为PhoneGap写一个android插件,要怎么做? 其实这句话应该反过来说,为android写一个PhoneGap插件,要怎么做? 这里以最简单的Hello World!为例,做个说明: 1.第一 ...

  2. leaning website

      -->SoapUI http://soapui-tutorial.com/home/login/SOAPUI    Module 13 - 1, 2, 3, 4, 5, 6 Module 1 ...

  3. YOCTO

    Yocto ,是一个开源社区它通过提供模版.工具和方法帮助开发者创建基于linux内核的定制系统,支持ARM, PPC, MIPS, x86 (32 & 64 bit)硬件体系架构.

  4. Codeforces--618A--Slime CombiningCrawling(数学)

     Slime CombiningCrawling in process... Crawling failed Time Limit:2000MS     Memory Limit:262144KB ...

  5. bag of words in c++

    #include <iostream> #include <vector> #include <cstddef> #include <string> # ...

  6. bzoj4082

    贪心+倍增 首先如果这个问题在序列上,好像可以按右端点排序,然后从起点开始向能到的最远的地方走. 但是环上不可以,因为随即一个起点可能不是最小的. 然后神思路来了:我们先将环展开倍增,再将区间按右端点 ...

  7. bzoj4889

    http://www.lydsy.com/JudgeOnline/problem.php?id=4889 人傻常数大 bzoj上跑不过 洛谷上能过两到三个点 我写的是树套树啊 怎么跑的比分块还慢 每次 ...

  8. jsp简单学习总结

    以下均为jsp页面 1:<jsp:include page="index.jsp"/>相当于嵌入一个页面.还有一种是<frame src="main_l ...

  9. bzoj4247: 挂饰(背包dp)

    4247: 挂饰 Time Limit: 10 Sec  Memory Limit: 256 MBSubmit: 1136  Solved: 454[Submit][Status][Discuss] ...

  10. [Apple开发者帐户帮助]九、参考(2)撤销特权

    您可以撤消的证书取决于证书类型和您的角色.如果您是个人注册,则可以撤销所有类型的开发和分发证书,除非另有说明.组织团队的任何成员都可以撤销自己的开发证书,但只有帐户持有人或管理员可以撤销分发证书. 证 ...