title: Multithreading and Multiprocessing from imported matlab files
body: <p>This is probably a long shot but I asked a question about converting one of the statistics toolbox codes earlyier into C# realising that it was just a huge and lengthy process and there was not much in the way to automate it <em>(really what I wanted as the references I provided explained why it was so hard to do by hand, as the comments I got where: why dont you try convert it and ask questions on where you are stuck, which obviously my question wasnt understood!)</em>. </p>
  
  <p>The reason I was looking to do this is because of the long processing time required by matlab to complete what im working on (k-means and bayes classifiers on large data sets). So I thought well hey why not just convert the code into C# and try my hand at multithreading and Multiprocessing, this might provide a functional means to decrease the processing time. But obviously its extremely hard to convert all of matlabs functions to C# by hand to accommandate this. </p>
  
  <p>So my question is if I import matlabs files into C# is it possible to have them used/ran in multithreading and multiprocessing fashion or will the imported files just run like they do in matlab?</p>
  
  <p>The reason (I think) it runs slow in matlab is that the functions or some of them in the statistics toolbox only benefit from multithreading specifically:</p>
  
  <pre><code>MATHEMATICS
  Arrays and matrices
  • Basic information: ISFINITE, ISINF, ISNAN, MAX, MIN
  • Operators: +, -, .*, ./, .\, .^, *, ^, \ (MLDIVIDE), / (MRDIVIDE)
  • Array operations: PROD, SUM
  • Array manipulation: BSXFUN, SORT
  
  
  Linear algebra
  • Matrix Analysis: DET, RCOND
  • Linear Equations: CHOL, INV, LINSOLVE, LU, QR
  • Eigenvalues and singular values: EIG, HESS, SCHUR, SVD, QZ
  
  Elementary math
  • Trigonometric: ACOS, ACOSD, ACOSH, ASIN, ASIND, ASINH, ATAN, ATAND, ATANH, COS, COSD, COSH,HYPOT, SIN, SIND, SINH, TAN, TAND, TANH
  • Exponential: EXP, POW2, SQRT
  • Complex: ABS
  • Rounding and remainder: CEIL, FIX, FLOOR, MOD, REM, ROUND
  
  Special Functions
  • ERF, ERFC, ERFCINV, ERFCX, ERFINV, GAMMA, GAMMALN
  
  DATA ANALYSIS
  • CONV2, FILTER, FFT and IFFT of multiple columns or long vectors, FFTN, IFFTN  
  </code></pre>
  
  <p>So im not to sure how or in what way I could potentially decrease the processing time, the kmeans and bayes classifier when processeing near tens of thousands of records really is just unbearable on its processing time (understandable). </p>