Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.
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.
Error when call a Matlab function
Posted 17 juin 2014, 19:45 UTC−4 Interfacing, Materials Version 4.3a 2 Replies
Please login with a confirmed email address before reporting spam
Hi,
I have created a matlab function, function[r]= vel(w1,w2), to the velocity of reaction in a reacting flow model. The function has two inputs, w1 and w2, the mass fractions of the reagents, which are dependent variables in the Comsol model. I expect that the function returns a real number, but I get the next error message when I try to run Comsol:
Error using ==> mtimes
Inner matrix dimensions must agree.
- Function: vel
Must the function return be a matrix? What is the size of this matrix? because I think that the inputs, w1 and w2, are scalar numbers.
Thanks for any help.
I have created a matlab function, function[r]= vel(w1,w2), to the velocity of reaction in a reacting flow model. The function has two inputs, w1 and w2, the mass fractions of the reagents, which are dependent variables in the Comsol model. I expect that the function returns a real number, but I get the next error message when I try to run Comsol:
Error using ==> mtimes
Inner matrix dimensions must agree.
- Function: vel
Must the function return be a matrix? What is the size of this matrix? because I think that the inputs, w1 and w2, are scalar numbers.
Thanks for any help.
2 Replies Last Post 18 juin 2014, 09:36 UTC−4