Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

How to export data in "m" file?

Please login with a confirmed email address before reporting spam

In comsol with matlab, actually, in matlab, I need export a data array with "x,y" data, "x" is parameter value as "lambda0", "y" is the a bondary integration vaiables named as "all" .

How can I use the following expression to export data?

"x" is "colon(2e-7,1e-8,1e-6)"

"y" is " elem.var = {'all'};"

The following is the programme line in matlab.

% Integration coupling variables
clear elem
elem.elem = 'elcplscalar';
elem.g = {'1'};
src = cell(1,1);
clear bnd
bnd.expr = {{{},'nPoav_rfweh'}};
bnd.ipoints = {{{},'4'}};
bnd.frame = {{{},'xy'}};
bnd.ind = {{'1','2','3','4','5','7','8','9','10','11','12','14','15', ...
'17','18','19','20','21','22'},{'6','13','16'}};
src{1} = {{},bnd,{}};
elem.src = src;
geomdim = cell(1,1);
geomdim{1} = {};
elem.geomdim = geomdim;
elem.var = {'all'};
elem.global = {'1'};
elem.maxvars = {};
elemcpl{1} = elem;
fem.elemcpl = elemcpl;



% Solve problem
fem.sol=femstatic(fem, ...
'solcomp',{'scEz'}, ...
'outcomp',{'scEz'}, ...
'blocksize','auto', ...
'pname','lambda0', ...
'plist',[colon(2e-7,1e-8,1e-6)], ...
'oldcomp',{}, ...
'linsolver','pardiso');

0 Replies Last Post 17 janv. 2011, 08:41 UTC−5
COMSOL Moderator

Hello Zhe Wang

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.