40m QIL Cryo_Lab CTN SUS_Lab TCS_Lab OMC_Lab CRIME_Lab FEA ENG_Labs OptContFac Mariner WBEEShop
  COMSOL elog  Not logged in ELOG logo
Message ID: 16     Entry time: Mon Jun 10 18:37:09 2013
Author: Matt A. 
Type: General 
Category: General 
Subject: Response to question in: Disscussion of the code of a 'comsol with matlab' model file (partially complete). 


trange = ['range(0,' num2str(dt) ',' num2str(t_end) ')'];

**There is however a query regarding the keyword range which in Matlab returns the difference between the maximum and minimum of the list passed to it. range() passed to COMSOL would probably create an array fro 0 - t_end in steps of dt.

The above line converts the quatity 'dt' and 't_end' to a string and concatenates it along with the rest of the string to make a valid string that would be understood by COMSOL.

You'll notice that the range command that is given to COMSOL is in single quotes, that means that all Matlab is doing is feeding to COMSOL a string, just as you would send it numerical values as a string.

It is COMSOL that evaluates this range command, so it can be different from Matlab's range command.


ELOG V3.1.3-