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 transfer desired x,y,z coordinates to MATLAB function?

Please login with a confirmed email address before reporting spam

Hello, I am working on a MATLAB function to calculate my pressure for Comsol. Now my function is working. How can I tell Comsol that i want the x,y,z position? So: In the Global Definitions now I do have a Matlab function called MATLAB1. In this function I have defined my MATLAB function like this:

function name: pressure

Arguments: x,y,z

I tried to call the function in the components via: pressure(x,y,z), but I keep getting the error: unexpected unit of Input. Do I need to declare my Matlab function otherwise? And: How do I tell Comsol that I want the x,y,z coordinates there? Any suggestions?

Kind regards,


0 Replies Last Post Dec 1, 2017, 5:03 a.m. EST
COMSOL Moderator

Hello Christian Berwanger

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.

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.