How can I solve it with randi?

2 views (last 30 days)
Farjana Sumaiya
Farjana Sumaiya on 19 Oct 2016
Answered: Walter Roberson on 19 Oct 2016
Create a MATLAB script to read the Excel file. This file contains student names that you are to organize in random teams. Your script will take as input the filename and the number of students per team. It will then output student names and the team they are assigned to.
  3 Comments
Farjana Sumaiya
Farjana Sumaiya on 19 Oct 2016
Edited: Walter Roberson on 19 Oct 2016
IMIN=1;
IMAX=13;
r=randi(IMIN,IMAX);
teams=x;
Walter Roberson
Walter Roberson on 19 Oct 2016
randi([IMIN, IMAX])

Sign in to comment.

Answers (1)

Walter Roberson
Walter Roberson on 19 Oct 2016
Hint: randperm mod number of teams

Categories

Find more on Data Import from MATLAB in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!