Matlab Bingo Game card

7 ビュー (過去 30 日間)
Karanpreet Singh 2019 年 11 月 27 日
Commented: Karanpreet Singh 2019 年 11 月 30 日
How to create a bingo card in matlab?
need Code...

3 件のコメント

Steven Lord 2019 年 11 月 27 日
This sounds like a homework assignment. If it is, show us the code you've written to try to solve the problem and ask a specific question about where you're having difficulty and we may be able to provide some guidance.
If you aren't sure where to start because you're not familiar with how to write MATLAB code, I suggest you start with the MATLAB Onramp tutorial (https://www.mathworks.com/support/learn-with-matlab-tutorials.html) to quickly learn the essentials of MATLAB.
Karanpreet Singh 2019 年 11 月 27 日
I am trying to genrate random numbers to create a bingo card using randperm function. so, the numbers dont repeate itself.but its not working.
A = randperm(15,5)'
C = randperm([16,30],5)'
D = randperm([31,45],5)'
E = randperm([46,60],5)'
F = randperm([61,75],5)'
Image Analyst 2019 年 11 月 27 日

サインイン to comment.

採用された回答

Steven Lord 2019 年 11 月 27 日
randperm accepts a scalar (just one number) as its first input.
You could generate a set of random numbers from 1 to 15 and use those to select from a vector of allowed values for each letter using indexing. Another approach would be to figure out how to map numbers from 1 to 15 into the set of allowed values for a letter (61 to 75 for O, as one example.)

1 件のコメント

Karanpreet Singh 2019 年 11 月 30 日
THANK YOU

サインイン to comment.