Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Passing arguments through batch()

Subject: Passing arguments through batch()

From: PLH

Date: 24 Nov, 2010 15:05:05

Message: 1 of 2

Hello,

I'm trying to run my_func(a,b,c) using batch, but I'm having difficulty passing the parameters through batch(). I tried

job1 = batch('my_func',2,{a,b,c},matlabpool,2)

where my_func returns 2 NxM matrices, as per the documentation. I get the error

Error in ==> matlabpool at 92
iVerifyJava();

??? Output argument "varargout" (and maybe others) not assigned during call to "C:\Program
Files\MATLAB\R2010a\toolbox\distcomp\matlabpool.m>matlabpool".

Any help on getting this to work would be greatly appreciated. At present, I have to use scripts rather functions and manually enter the parameters in the file.

Thanks,

PLH.

Subject: Passing arguments through batch()

From: Edric M Ellis

Date: 24 Nov, 2010 15:23:55

Message: 2 of 2

"PLH " <paulhalkyard@googlemail.com> writes:

> I'm trying to run my_func(a,b,c) using batch, but I'm having
> difficulty passing the parameters through batch(). I tried
>
> job1 = batch('my_func',2,{a,b,c},matlabpool,2)

You need to replace this with:

job1 = batch('my_func',2,{a,b,c},'matlabpool',2)

I.e. the string 'matlabpool' is a parameter to the batch function.

Cheers,

Edric.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us