<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
 <channel>
  <atom:link href="http://www.comsol.eu/community/forums/matlab/rss/thread/365.rss" rel="self" type="application/rss+xml"/>
  <title>COMSOL Forums: Import Matlab m-file back to COMSOL</title>
  <link>http://www.comsol.eu/community/forums/general/thread/365/</link>
  <description>Most recent forum messages</description>
  <pubDate>Wed, 25 Jan 2012 17:51:17 +0000</pubDate>
  <image>
   <title>COMSOL Forums: Import Matlab m-file back to COMSOL</title>
   <url>http://www.comsol.eu/shared/images/logos/comsol_logo.gif</url>
   <link>http://www.comsol.eu/community/forums/general/thread/365/</link>
  </image>
  <item>
   <title>Re: Import Matlab m-file back to COMSOL</title>
   <link>http://www.comsol.eu/community/forums/general/thread/365/#p69138</link>
   <description>Nikita,&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Have you tried the command 'mphsave'? It converts a .m to .mph, see the Livelink for Matlab User's Guide or type 'help mphsave' in Matlab. It works just fine here with comsol 4.2a and Matlab R2011a.</description>
   <pubDate>Wed, 25 Jan 2012 17:51:17 +0000</pubDate>
   <guid isPermaLink="false">365.1327513877.69138</guid>
  </item>
  <item>
   <title>Re: Import Matlab m-file back to COMSOL</title>
   <link>http://www.comsol.eu/community/forums/general/thread/365/#p69121</link>
   <description>&lt;div class=&quot;quote&quot;&gt;&lt;br /&gt;&#13;
&lt;div class=&quot;quote&quot;&gt;&lt;br /&gt;&#13;
Hi,&lt;br /&gt;&#13;
if you have matlab connection to comsol, you can save the m file from comsol, modify the file in matlab and then re-load the so-modified file in comsol (file&amp;gt;open&amp;gt;.mfile). Anyway, you can also export the fem structure (file&amp;gt;export&amp;gt;fem) and view the variable within the matlab workspace. If you know the fem structure with its fields you can modify it and then re-load in comsol (file&amp;gt;import&amp;gt;fem) where you can run the solution.&lt;br /&gt;&#13;
On the other hand, if you save the m.file you can run the model directly from matlab (without using comsol again).&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
If you do not delete or modify the field fem{1}.appl.bnd, boundary conditions are correctly imported . You can verify it...&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Good luck&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Pasquale&lt;br /&gt;&#13;
&lt;/div&gt;&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Hi,&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
I am using V3.5a. After exporting an m file from COMSOL to Matlab, I can see the changes that I make in COMSOL's GUI are implemented in MATLAB's script. But I cannot do the other way around, i.e. after I make a modification in the geometry in MATLAB script, I save the m file and open it in COMSOL, and I get this error:&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Error: 9040&lt;br /&gt;&#13;
Fatal Error.&lt;br /&gt;&#13;
Type: NullPointerException&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Any idea why this happens?&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Thanks,&lt;br /&gt;&#13;
Manuel&lt;br /&gt;&#13;
&lt;/div&gt;&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Hi&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
I am facing the same problem.. I am using Comsol 4.2a and matlab 2008a and when i save the changes in the Matlab m-file for the comsol model, it does not recognize the changed parameters. Also, does anyone know how i can use matlab variables in a Matlab-Simulink-Comsol interface problem where i declare a comsol variable = a time dependent matlab variable through the simulink sfunction. so basically i cannot use the matlab functions through livelink and i need to use the matlab variables.&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
any sort of help would be appreciated. thanks a lot!</description>
   <pubDate>Wed, 25 Jan 2012 10:11:54 +0000</pubDate>
   <guid isPermaLink="false">365.1327486314.69121</guid>
  </item>
  <item>
   <title>Re: Import Matlab m-file back to COMSOL</title>
   <link>http://www.comsol.eu/community/forums/general/thread/365/#p47249</link>
   <description>&lt;div class=&quot;quote&quot;&gt;&lt;br /&gt;&#13;
Hi,&lt;br /&gt;&#13;
if you have matlab connection to comsol, you can save the m file from comsol, modify the file in matlab and then re-load the so-modified file in comsol (file&amp;gt;open&amp;gt;.mfile). Anyway, you can also export the fem structure (file&amp;gt;export&amp;gt;fem) and view the variable within the matlab workspace. If you know the fem structure with its fields you can modify it and then re-load in comsol (file&amp;gt;import&amp;gt;fem) where you can run the solution.&lt;br /&gt;&#13;
On the other hand, if you save the m.file you can run the model directly from matlab (without using comsol again).&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
If you do not delete or modify the field fem{1}.appl.bnd, boundary conditions are correctly imported . You can verify it...&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Good luck&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Pasquale&lt;br /&gt;&#13;
&lt;/div&gt;&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Hi,&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
I am using V3.5a. After exporting an m file from COMSOL to Matlab, I can see the changes that I make in COMSOL's GUI are implemented in MATLAB's script. But I cannot do the other way around, i.e. after I make a modification in the geometry in MATLAB script, I save the m file and open it in COMSOL, and I get this error:&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Error: 9040&lt;br /&gt;&#13;
Fatal Error.&lt;br /&gt;&#13;
Type: NullPointerException&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Any idea why this happens?&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Thanks,&lt;br /&gt;&#13;
Manuel&lt;br /&gt;&#13;
</description>
   <pubDate>Thu, 21 Apr 2011 12:13:30 +0000</pubDate>
   <guid isPermaLink="false">365.1303388010.47249</guid>
  </item>
  <item>
   <title>Re: Import Matlab m-file back to COMSOL</title>
   <link>http://www.comsol.eu/community/forums/general/thread/365/#p41267</link>
   <description>&lt;div class=&quot;quote&quot;&gt;&lt;br /&gt;&#13;
Are you running the software with the COMSOL Multiphysics with MATLAB shortcut?  You should see File &amp;gt; Import &amp;gt; FEM Structure.&lt;br /&gt;&#13;
&lt;/div&gt;&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
This is not valid anymore in COMSOL 4.1</description>
   <pubDate>Wed, 09 Mar 2011 13:17:49 +0000</pubDate>
   <guid isPermaLink="false">365.1299676669.41267</guid>
  </item>
  <item>
   <title>Re: Import Matlab m-file back to COMSOL</title>
   <link>http://www.comsol.eu/community/forums/general/thread/365/#p910</link>
   <description>Hi,&lt;br /&gt;&#13;
if you have matlab connection to comsol, you can save the m file from comsol, modify the file in matlab and then re-load the so-modified file in comsol (file&amp;gt;open&amp;gt;.mfile). Anyway, you can also export the fem structure (file&amp;gt;export&amp;gt;fem) and view the variable within the matlab workspace. If you know the fem structure with its fields you can modify it and then re-load in comsol (file&amp;gt;import&amp;gt;fem) where you can run the solution.&lt;br /&gt;&#13;
On the other hand, if you save the m.file you can run the model directly from matlab (without using comsol again).&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
If you do not delete or modify the field fem{1}.appl.bnd, boundary conditions are correctly imported . You can verify it...&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Good luck&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Pasquale</description>
   <pubDate>Wed, 05 Aug 2009 17:15:34 +0000</pubDate>
   <guid isPermaLink="false">365.1249492534.910</guid>
  </item>
  <item>
   <title>Re: Import Matlab m-file back to COMSOL</title>
   <link>http://www.comsol.eu/community/forums/general/thread/365/#p890</link>
   <description>It doesn't seem to import boundary conditions. Any ways to import those as well.</description>
   <pubDate>Wed, 05 Aug 2009 10:56:53 +0000</pubDate>
   <guid isPermaLink="false">365.1249469813.890</guid>
  </item>
  <item>
   <title>Re: Import Matlab m-file back to COMSOL</title>
   <link>http://www.comsol.eu/community/forums/general/thread/365/#p869</link>
   <description>Are you running the software with the COMSOL Multiphysics with MATLAB shortcut?  You should see File &amp;gt; Import &amp;gt; FEM Structure.</description>
   <pubDate>Tue, 04 Aug 2009 17:10:10 +0000</pubDate>
   <guid isPermaLink="false">365.1249405810.869</guid>
  </item>
  <item>
   <title>Import Matlab m-file back to COMSOL</title>
   <link>http://www.comsol.eu/community/forums/general/thread/365/#p863</link>
   <description>Hi,&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
I have a Matlab m-file that was generated by COMSOL previously. I made some changes since. Now I wonder if it is possible to import it back to COMSOL again. Thanks.&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Wan</description>
   <pubDate>Tue, 04 Aug 2009 14:00:57 +0000</pubDate>
   <guid isPermaLink="false">365.1249394457.863</guid>
  </item>
 </channel>
</rss>

