Jump to content

ashwin1124

New Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by ashwin1124

  1. Hi there cn anyone help me with my work...i'll put the question... the digit 0 to 9 be associated with the alphabets A to J as follows 0-j1-h2-a3-c4-e5-g6-i7-f8-b9-d write a matlab program that prompts the user to input a seven digit telephonenumber and then displays a list of all letters that can be formed from thenumber.for example 7848979 begins :fbebdfd, fbebddf, fbebfddsupport your work with a flow chart xfunction alpha %First we define a matrix a for the lettersa = ['JHACEGIFBD']; %Input 7 digit telephone number using 'input' function and store in matrix e for n = 1:7, b = input('\nPlease enter a 7 digit number (after each number press enter): '); e(n) = b; end %Match each number of tel no. with a letter from matrix a and store in matrix m for n = 1:7, h = e(n); m(n) = a(h); end %Use perms function to permutate the digits in matrix m p = perms(e)end
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.