24小时热门版块排行榜    

CyRhmU.jpeg
查看: 5118  |  回复: 4

mistytang

新虫 (初入文坛)

[求助] 请问FDTD solutions8.6版本用脚本文件模拟出来的图怎么导出数据?已有1人参与

请问FDTD solutions8.6版本用脚本文件模拟出来的图怎么导出数据?比如吸收光谱,消光光谱。
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

天路一方

金虫 (小有名气)

【答案】应助回帖

★ ★ ★ ★ ★ ★ ★ ★ ★ ★
mistytang: 金币+10, ★★★★★最佳答案 2014-12-10 10:10:09
你这孩子,说了私聊就没信了,金币太多是吧,我也不白拿红花,给你贴在这里吧
# define the variables to export
a=lam*1e9;
b=sigmaext;
ca=-(sigmaabs.sigma);
d=sigmascat.sigma;
f="crossections10a-2.txt";

# remove the file it if already exists
if (fileexists(f)) { rm(f);}

# write the file header
write(f,"wavelength(m), ext(sq nm), abs, scat";

# write the data to the file
for(i=1:length(a)){ # loop over the length of the data
write(f,num2str(a(i))+"        "+num2str(b(i))+"        "+num2str(ca(i))+"        "
+num2str(d(i)));
}
这个导出extinction,absorption和scattering的部分,看不懂再问我
知天易,逆天难
2楼2014-11-08 17:48:12
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

天路一方

金虫 (小有名气)

【答案】应助回帖

该死,那个害羞的表情是个右括号!!)
知天易,逆天难
3楼2014-11-08 17:50:33
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

zyp971008

新虫 (小有名气)

引用回帖:
3楼: Originally posted by 天路一方 at 2014-11-08 17:50:33
该死,那个害羞的表情是个右括号!!)

你好请问这个我打进去显示错误啊

[ 发自手机版 http://muchong.com/3g ]
4楼2018-04-29 14:34:39
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

kallychein

新虫 (初入文坛)

引用回帖:
2楼: Originally posted by 天路一方 at 2014-11-08 17:48:12
你这孩子,说了私聊就没信了,金币太多是吧,我也不白拿红花,给你贴在这里吧
# define the variables to export
a=lam*1e9;
b=sigmaext;
ca=-(sigmaabs.sigma);
d=sigmascat.sigma;
f="crossection ...

我根据自己的需求做了些修改之后真的成功了,这个编码没有问题,大佬6666,感激感激!
5楼2020-09-08 13:55:56
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 mistytang 的主题更新
信息提示
请填处理意见