how do i prompt

1 view (last 30 days)
janny
janny on 13 Jun 2016
Commented: janny on 13 Jun 2016
hi guys,,, am working in a binary random matrix by using the command
dec2bin((rand(50,1)*2^32)
i want to add a prmopt before this line to ask for entering column and row

Accepted Answer

the cyclist
the cyclist on 13 Jun 2016
Use the input command.

More Answers (1)

Adam
Adam on 13 Jun 2016
rowCol = input( 'Enter row and column\n' );
would work if the user inputs something like:
[9 8];
Or you could split into two prompts, one for each if you prefer.

Categories

Find more on Creating and Concatenating Matrices 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!