Quantcast
Channel: Latest Discussions - COMSOL Forums
Viewing all articles
Browse latest Browse all 26527

Save data to a text file using MATLAB LIVELINK with COMSOL

$
0
0
Hi All,

I have one COMSOL GUI model which runs perfectly. I save the model as .m file and run in MATLAB.
In the COMSOL desktop, I use the export command to extract data.
Therefore, I am expecting when I run the .m file it would save the data into the text file. But it does not.

Would you please tell me what is wrong?
...................................................
model.result('pg1').name('Mode Shape (solid)');
model.result('pg1').set('looplevel', {'7'});
model.result('pg1').feature('surf1').feature('def').set('scale', '0.0032430428634612173');
model.result('pg1').feature('surf1').feature('def').set('scaleactive', false);
model.result.export('data1').set('header', false);
model.result.export('data1').set('descr', {'Frequency'});
model.result.export('data1').set('fullprec', false);
::::::::::::::::::::::::::
model.result.export('data1').set('filename', 'C:\Users\ASTL\Desktop\COMSOL_Tutorial\FEM_Project\Modal_Project.txt');
:::::::::::::::::::::::::::::::
model.result.export('data1').set('unit', {'1/s'});
model.result.export('data1').set('transpose', true);
model.result.export('data1').set('sdim', 'global');
model.result.export('data1').set('expr', {'freq'});

I appreciate your response.

Viewing all articles
Browse latest Browse all 26527

Trending Articles