how do i prompt

3 次查看(过去 30 天)
janny
janny 2016-6-13
评论: janny 2016-6-13
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

采纳的回答

the cyclist
the cyclist 2016-6-13
Use the input command.

更多回答(1 个)

Adam
Adam 2016-6-13
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.

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by