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.
Misfunctioning of importData method in Livelink.
Posted 6 sept. 2012, 11:15 UTC−4 Version 4.2, Version 4.2a, Version 4.3 1 Reply
Please login with a confirmed email address before reporting spam
Dear all,
I would like to ask you the following. I am facing problems in using the importData method in Livelink.
More precisely, using Livelink, in Matlab I am able to read a model, create inside Matbal a interpolation function over the mesh of a set of data and save the interpolation function in the Comsol Model. When it's time to import the data, the problem comes out. In fact, these are the lines to define the properties of my interpolating function:
model.func('value').set('nargs', '3');
model.func('value').set('defvars', true);
model.func('value').set('source', 'file');
model.func('value').set('filename', '/amd/smana3/root/vol/vol1/cmcs/tricerri/Comsol/MatlabScripts/associatedData.txt');
model.func('value').set('interp','linear');
model.func('value').set('sourcetype','user');
Then to import the data, if I use the model.func(tag).importData() command (as suggested in the guide) when I open the model (that has been modified in Matlab) in Comsol I am not able to plot the interpolating function. If I just define the filename and then, just import the file using Comsol (therefore I remove the importData command from Matlab) then, I can plot the interpolating function.
I have not found any guide about importData. Do you know how to use it? What am I missing?
Many thanks,
Paolo Tricerri
I would like to ask you the following. I am facing problems in using the importData method in Livelink.
More precisely, using Livelink, in Matlab I am able to read a model, create inside Matbal a interpolation function over the mesh of a set of data and save the interpolation function in the Comsol Model. When it's time to import the data, the problem comes out. In fact, these are the lines to define the properties of my interpolating function:
model.func('value').set('nargs', '3');
model.func('value').set('defvars', true);
model.func('value').set('source', 'file');
model.func('value').set('filename', '/amd/smana3/root/vol/vol1/cmcs/tricerri/Comsol/MatlabScripts/associatedData.txt');
model.func('value').set('interp','linear');
model.func('value').set('sourcetype','user');
Then to import the data, if I use the model.func(tag).importData() command (as suggested in the guide) when I open the model (that has been modified in Matlab) in Comsol I am not able to plot the interpolating function. If I just define the filename and then, just import the file using Comsol (therefore I remove the importData command from Matlab) then, I can plot the interpolating function.
I have not found any guide about importData. Do you know how to use it? What am I missing?
Many thanks,
Paolo Tricerri
1 Reply Last Post 26 sept. 2012, 10:02 UTC−4