添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

虽然脚本功能强大,但是对于初学者,一开始可能不知道哪些脚本能用,脚本文件出错了不知如何诊断,例如

line 29: matrix index out of range 就要发邮件或者帖子求助。这个帖子是为初学者提供学习脚本和诊断简单错误而写的。

相信很多读者对Matlab比较熟悉,Lumerical的脚本与Matlab的极其类似,语法基本通用,而且可以完全调用Matlab文件,关于Matlab调用,常见的就这几个命令

matlab https://support.lumerical.com/hc/en-us/articles/360034407974-matlab

matlabget

matlabload

matlabput

matlabsave

另外,利用Python可以用Matlab调用Lumercial脚本,这里暂不多讲。下面介绍几个常用的分析结果的脚本命令,大家可以一边看一边测试。

注意: 因为浏览器和中文问题,帖子里的括号、引号等可能不能直接拷贝运行,建议大家自己输进去脚本,以免运行时出错。

Ansys Insight: 几个简单实用的脚本 Script 命令:用于设置


1: ? 问号、size和 length

前述的错误,说明矩阵的维数出了问题。可以用? 查找。例如,变量名var1。 在行输入窗口(Prompt):

The Ansys Learning Forum is a public forum. You are prohibited from providing (i) information that is confidential to You, your employer, or any third party, (ii) Personal Data or individually identifiable health information, (iii) any information that is U.S. Government Classified, Controlled Unclassified Information, International Traffic in Arms Regulators (ITAR) or Export Administration Regulators (EAR) controlled or otherwise have been determined by the United States Government or by a foreign government to require protection against unauthorized disclosure for reasons of national security, or (iv) topics or information restricted by the People's Republic of China data protection and privacy laws. The Ansys Learning Forum is a public forum. You are prohibited from providing (i) information that is confidential to You, your employer, or any third party, (ii) Personal Data or individually identifiable health information, (iii) any information that is U.S. Government Classified, Controlled Unclassified Information, International Traffic in Arms Regulators (ITAR) or Export Administration Regulators (EAR) controlled or otherwise have been determined by the United States Government or by a foreign government to require protection against unauthorized disclosure for reasons of national security, or (iv) topics or information restricted by the People's Republic of China data protection and privacy laws. Continue