Dear All, I used several parameters in COMSOL while creating a geometry. I imported this geometry into COMSOL with MATLAB. I need to use these parameters (initially created in COMSOL) in a loop at various places AS VARIABLES in COMSOL with MATLAB. Every time I need to use either function str2num before each parameter or need to remove inverted commas ( ' ' )for each and every parameter.
Example:
model.geom('geom1').feature('blk1').set('size', ['SampleLength' 'SampleWidth' 'SampleThickness']) will not work in a loop when using COMSOL server MATLAB WHILE IT IS THE DEFAULT ONE.
SampleLength, SampleWidth, SampleThickness are parameters and numerical value of these parameters is getting varied while in a loop.
Either model.geom('geom1').feature('blk1').set('size', [SampleLength 'SampleWidth SampleThickness]) OR
model.geom('geom1').feature('blk1').set('size', [str2num(SampleLength) str2num(SampleWidth) str2num(SampleThickness)]) will work in a loop when using COMSOL server MATLAB.
This exercise becomes tedious when there are lots of parameters.
Is there any other way out. Please kindly help me out.
Asha Sharma INDIA