Skip to content

Correct the statement

59 viewsProgramming
0

Sir, i have a vector consisting of 112 information symbols,can we write a statement in MATLAB like b=randi(112,1)-1 ,Is the way to write a code correct or not?

0

The syntax for randi command is

This will generate a mxn matrix with random numbers from 1 to imax

If you have information symbols that should start from 0, use

So to have a vector of 112 information symbols (112×1 matrix) that can take any number in the range say 0 to 49, use

 

Check the command documentation