How do I run MATWEB from the MATLAB command line?

1 view (last 30 days)
How do I run MATWEB from the MATLAB command line and pass parameters to it which it can then pass on to the matlabserver?
How do I specify my own command line parameters without resorting to hardcoding them in the conf file?
For example, the matweb.conf file looks as follows:
[webmagic]
mlserver=localhost
mldir=c:/progra~1/services/apache~1/apache/www/matlab/icons
msize=3
When I run the following code from the command line I get the correct output.
c:>matweb mlmfile=webmagic
However when I remove the msize=3 line from the conf file and do the following, MATWEB complains that msize is not defined.
c:>matweb mlmfile=webmagic msize=3

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
It is not possible to specify parameters for the MATWEB.CONF file from the MATLAB command line.
One way to call MATWEB from the MATLAB command line is by calling MATWEB with a MATLAB structure as an argument. For the webmagic file, we need to pass MATWEB a structure with both the mlmfile and msize fields.
For example:
>> instruct.mlmfile='webmagic'
instruct =
mlmfile: 'webmagic'
>> instruct.msize='3'
instruct =
mlmfile: 'webmagic'
msize: '3'
>> matweb(instruct)

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!