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

Error when call a Matlab function

$
0
0
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.

Viewing all articles
Browse latest Browse all 2194

Trending Articles



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