[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: parcellfun and global data
From: |
Olaf Till |
Subject: |
Re: parcellfun and global data |
Date: |
Tue, 7 Dec 2010 09:21:12 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Tue, Dec 07, 2010 at 08:55:28AM +0100, Fredrik Lingvall wrote:
> Can the functions called by parcellfun access global data?
>
> Background: I want to plot multi-channel audio data (time plots and
> spectrograms) but the printing is rather slow so I want to do this in
> parallel if possible. I don't want each "print-function" to reload the
> large dataset though (or copy it) so is it possible to access it
> globally in some way?
>
> /Fredrik
If the global data is ready before calling parcellfun and if it is not
changed during the parcellfun run, you should be able to access it as
usual. (As a global variable, or with an anonymous function as
[output] = parcellfun (nproc, @ (x) user_function (x, global_data),
input);
Olaf