*i need simple example using pmode . for example : if I have this array
x=[2 90 2 17 80; 5 3 2 90 8; 60 74 1 2 3;55 6 4 11 0];
how i can use my two workers to sum this array, where each worker will work on part of array, the collect the result.
I don't know how i partition the array on two workers , the how to collect the results.
please , i need simple example about that.
thanks in advance*
No products are associated with this question.
Here's an example how to use
arrays and how to use SPMD:
matlabpool open 2 x = 1:1:100; y = 100:-1:1; dx = distributed(x); dy = distributed(y); dz = dx + dy spmd dz end
Note that dz is distributed across two workers :-).
Hope this helps
Play games and win prizes!Learn more