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.
Using a MATLAB function that returns an array as input for a variable in COMSOL
Posted 11.03.2014, 14:51 GMT-4 0 Replies
Please login with a confirmed email address before reporting spam
I have a MATLAB function written that returns an array. I'm trying to use this array for a variable in COMSOL. The MATLAB function calculates a distributed force that is a function of length and radius of cylinder. I am passing the radius and length of the cylinder from COMSOL to MATLAB as arguments. Then I am trying to have the force, as an array, be applied to a surface of the cylinder. This is not working, the error I am getting is
" Output argument "Fp" (and maybe others) not assigned during call to "C:\Users\owner\Dropbox\Graduate School\COMSOL\MatlabAreaModel\AreaModelFunction2.m>AreaModelFunction2".
- Function: AreaModelFunction2 ".
I'm not really sure what is wrong about this. If anyone could help it would be greatly appreciated. Also, if anyone could explain how COMSOL handles arrays as input be it from an outside function or as a user defined variable/parameter in COMSOL itself it would be appreciated.
-Thanks
Hello Ryan Widejko
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.