help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

parallel package


From: Clinton Winant
Subject: parallel package
Date: Fri, 15 Apr 2016 08:10:34 -0700

I want to be able to compute 5 integrals in parallel.  I have read
http://wiki.octave.org/Parallel_package
in spite of the title this page contains nothing about parcellfun, 
I have built the following test routine:

vector_in = 1:5;

vector_out = pararrayfun(5,parquad(procid), vector_x)


function out=parquad(procid)
  switch procid
    case{1}
      out=quadgk(@(r) ntgrnd1(r),0,1);
    case{2}
      out=2*quadgk(@(r) ntgrnd1(r),0,1);
    case{3}
      out=3*quadgk(@(r) ntgrnd1(r),0,1);
    case{4}
      out=4*quadgk(@(r) ntgrnd1(r),0,1);
    case{5}
      out=5*quadgk(@(r) ntgrnd1(r),0,1);
  endswitch
endfunction

The error return is:

>> testpararrayfun
error: 'procid' undefined near line 3 column 36
error: called from
    testpararrayfun at line 3 column 12

Can anybody throw some light on this??

Thanks

reply via email to

[Prev in Thread] Current Thread [Next in Thread]