Results 1 to 2 of 2

Math Help - Matlab Pause and Randperm Function

  1. #1
    Newbie
    Joined
    Nov 2009
    Posts
    2

    Matlab Pause and Randperm Function

    How would one generate a 7 digit array of numbers from 1 to 23 without repetition. Then how would you display that array with a pause between each digit? Thanks in advance
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by ul09004409 View Post
    How would one generate a 7 digit array of numbers from 1 to 23 without repetition. Then how would you display that array with a pause between each digit? Thanks in advance
    generate a random permutation of 1,2,...23 and keep the first 7 elements:

    xx=randperm(23);
    xx=xx(1:7);

    CB
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. need a matlab function
    Posted in the Math Software Forum
    Replies: 1
    Last Post: February 1st 2011, 11:52 PM
  2. Matlab function
    Posted in the Math Software Forum
    Replies: 2
    Last Post: April 17th 2010, 09:11 PM
  3. Please help with MATLAB function
    Posted in the Math Software Forum
    Replies: 1
    Last Post: April 16th 2010, 05:21 AM
  4. need help with matlab function
    Posted in the Math Software Forum
    Replies: 2
    Last Post: March 24th 2010, 10:47 AM
  5. Matlab while function
    Posted in the Math Software Forum
    Replies: 1
    Last Post: May 10th 2009, 12:46 AM

Search Tags


/mathhelpforum @mathhelpforum