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

MATLAB LiveLink

$
0
0
Hi!

I am trying to model a smart material called Magnetorheological Elastomers. It can change it's stiffness when a magnetic field is present. To do this, I would like to use a MATLAB function that can calculate the shear modulus based on the field present.

However, I keep running to the issue that the MATLAB directory is not setup correctly... I have gone into MATLAB and set the path directly to where all of the files are located and it still cannot run.

I am using MATLAB 2013a and COMSOL 4.4. I have the read the User Guide for MATLAB LiveLink and I don't understand how to set up the path through the MATLAB command.

"CALLING MATLAB FUNCTION AT THE MATLAB PROMPT
Use MATLAB function to a define model property with the set method:
something.set(property, myfun(<arg>));
where myfun() is a M-function defined in MATLAB.
The function is called only when the command is executed at the MATLAB prompt.
The argument of the function <arg> call be MATLAB variables. To include an
expression value from the model object, you first need to extract it at the MATLAB
prompt, as it is described in Extracting Results.
The function myfun()accepts the model object model as input argument as any
MATLAB variables."

Any help would be appreciated!

Thanks!
Sarah

Viewing all articles
Browse latest Browse all 2194

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>