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 assign data matrix to variable

Please login with a confirmed email address before reporting spam

Hi everyone,

I have been stuck in this problem for a long time and really need a help!
I assume I have file .txt containning data in 2 columns.
I am wondering that Is it possible in Comsol to import file .txt into Comsol and assign it into a variable ?

May I use Matalb livelink to solve my problem ?
Can "model.variable(<tag>).set(<var>,<expr>)" expr be a matrix ?

Best regards,
N.N

1 Reply Last Post 31.03.2016, 02:16 GMT-4

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 31.03.2016, 02:16 GMT-4
Hi everyone,

Can somebody help me ?
Is it possible to do something like this as Matlab: "Variable Name"=[1 2 3 4 5 6]; in Variable under Definition ?

Best regards,
N.N
Hi everyone, Can somebody help me ? Is it possible to do something like this as Matlab: "Variable Name"=[1 2 3 4 5 6]; in Variable under Definition ? Best regards, N.N

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.