I'm trying to export a 2D matrix containing nodes coordinates of an Anys mesh (*.node), in Matlab. In this regard, I'm simply using fopen and fprintf commands in Matlab. For example:
========================================
fid = fopen('c:\new_nodes.node', 'wt');
fprintf(fid,'%3d %10.4e %10.4e %19.4e\n',new_nodes'); % new_nodes : my 2D matrix
=======================================
The content of generated file is okay but I cannot read it in Ansys, and when I open this file (e.g., new_nodes.node) in Notepad++ and do "save as", it becomes readable!!! It would be great if you could help me to find out whats the problem the Matlab code and how can I solve this problem... Thanks in advance,
\r
instead of\n
may help. – rahnema1'w'
instead of'wt'
in thefopen
function – Sardar Usama