I am trying to define the material properties (permittivity and conductivity) of a comsol model with MATLAB functions. The functions have six input arguments. Of the six, first two are usual COMSOL coordinate variables x and y (both are vector) The next three are vectors (1D array) and the sixth one is a scalar.
My approach:
I tried to define the last four variables using the model.param.set() method like following:
model.param.set('x1', x1);
model.param.set('y1', y1);
model.param.set('epsr1', epsr1);
model.param.set('del', del);
Then I would define the material property as following:
model.component('comp1').material('mat2').propertyGroup('def').set('relpermittivity', {'mat_epsr(x,y,x1,y1,epsr_array,del_c)'});
Unfortunately, this throws an error for trying to set an array as a parameter in COMSOL. The error message is as follows:
No method 'set' with matching signature found for class 'com.comsol.clientapi.impl.ModelParamClient'.
model.param.set('x1', x1);
How may I solve this error?