Use Matlab Editor to Write and Run Ansys Program.

Version 1.7.0.0 (8.11 KB) by Cai
write and run Ansys program in Matlab, use the excellent feature of MEditor.
3.2K Downloads
Updated 5 Apr 2011

View License

You don't have to switch your screen between Matlab, Ansys and UltraEdit or PSPad anymore, when you doing FEM-Analysis.

You can use MEditor to write your Ansys APDL program and use the excellent feature of MEditor to structure your Code: Cell-Function, Comment, Smart Indent, Code Folding, Cell Folding and so on.

What you only to do is:
include the .m file and Ansys.INI into your working Dictrionary and setting the Matlab Editor as following:

File -> Preference -> Editor/Debugger -> Language -> File extensions -> Add
enter: cai
than click ok;

now you can creat a .cai file and open that with your matlab editor, the Syntax, how to write a .cai file is explained in file Cai2Ansys.m. (you use the standard Ansys APDL to write your Ansys Program and use the Matlab Editor Funktion to structure your Ansys Program)

if you complete your Ansys program, you can call RunCaisFile(FileName,AnsysPath) to run your program:

FileName is the name of your .cai file without extension!

AnsysPath is the path, where your ansys.exe exist.

That's All, for more Information, read the Comment in particular M-File!

PS: Keyword highlighting is unavailable, because MEditor do not support User-Definded Keyword highlighting.

Cite As

Cai (2024). Use Matlab Editor to Write and Run Ansys Program. (https://www.mathworks.com/matlabcentral/fileexchange/30887-use-matlab-editor-to-write-and-run-ansys-program), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2009a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Environment and Settings in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.7.0.0

fix the BUG for Keyword-Checking:
/BATCH

1.1.0.0

complete the description in detail.

1.0.0.0