191k views
3 votes
Find the number of ways that 6 teachers can be assigned to 4 sections of an introductory psychology course if no teacher is assigned to more than one section.

You must be using the built-in functions in Matlab. (I need a code for Matlab). The answer according to the book is 6P4 = 6!/2! = 360. Matlab code is what I need. Don't use the answer already in I have checked them, they are not correct.

User Rach Chen
by
7.8k points

1 Answer

3 votes

Final answer:

To find the number of ways that 6 teachers can be assigned to 4 sections of an introductory psychology course using Matlab, you can use the npermutek() function.

Step-by-step explanation:

To find the number of ways that 6 teachers can be assigned to 4 sections of an introductory psychology course, we need to calculate the permutation of 6 teachers taken 4 at a time. In Matlab, you can use the built-in function nchoosek(n, k) to calculate the combination of n items taken k at a time.

Here's the code:

num_ways = npermutek(6, 4)

This code will give you the number of ways in which the 6 teachers can be assigned to the 4 sections, which is 360.

User Jennifer Goncalves
by
7.9k points