Question: please write this code in matlab. Run it to show that it is working. using System; using System.Threading: namespace HighPerfCompAss2_p3 class Program public static int[]

 please write this code in matlab. Run it to show thatplease write this code in matlab. Run it to show that it is working.

using System; using System.Threading: namespace HighPerfCompAss2_p3 class Program public static int[] = {4, 3, 1, 6, 8, 9, 100, 23, 13, 44, 14, 67, 89, 34, 23, 69, 100, 65, 32, 33, 4, 5, 6, 18 ); public static int min - 1000; static void my ThreadMethod(object myarray) int[] myarr = new int[2]; myarr = (int[]) marray; int threadid - myarr[@]; int size - myarr[1]; for (int i = threadid size; i a[i]) min = a[i]; Thread.Sleep(); static void Main(string[] args) //p is number of threads / is number of members in array a //Environment. ProcessorCount = number of virtual cores //Environment.ProcessorCount is going to equal 8, depends on CPU running code int p - Environment. ProcessorCount; int n = a. Length; int size - e; //Else included in case Environment ProcessorCount divides unevenly if ((n Xp) = e) size = n/pi else size - n/p; Thread[] t = new Thread[p]; for (int i - ; i

a[i]) min = a[i]; Thread.Sleep(); static void Main(string[] args) //p is number of threads / is number of members in array a //Environment. ProcessorCount = number of virtual cores //Environment.ProcessorCount is going to equal 8, depends on CPU running code int p - Environment. ProcessorCount; int n = a. Length; int size - e; //Else included in case Environment ProcessorCount divides unevenly if ((n Xp) = e) size = n/pi else size - n/p; Thread[] t = new Thread[p]; for (int i - ; i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!