Hello, I need help in writing code in matlab that asks user to input 2 to 5 unique characters from lowercase alphabets, and then ask user for repetition and order allowed or not and create subset of arrangements from it.

조회 수: 1 (최근 30일)
Construct a program that will return subsets of given type, your program must include: a. Ask user to enter unique elements, more than two and less than five that are lower case letters. b. If unique case letters are not entered, or there are fewer than two or more than five lower case letters, or if the elements are not lower case then the program should reset by telling user what to do next (ask for input again). c. Ask user if repetition is allowed with yes/no as choice. d. Ask user if order matters with yes/no as choice. e. The program then return all of appropriate subsets; 1. If order matters and repetition is allowed: "This shows an ordered list", appear after subsets. 2. If order matters and repetition is not allowed: "This shows Permutation", appear after subsets. 3. If order does not matter and repetition is allowed: "This shows an un-ordered list or bag", appear after subsets. 4. If order does not matter and repetition is not allowed: "This shows a set", appear after subsets. 5. The program will ask if Power set should be displayed if yes then power set should be displayed with appropriate symbols.

답변 (1개)

Tony Mohan Varghese
Tony Mohan Varghese 2017년 12월 1일

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by