Create a 3 x 5 matrix of random integers, each in the inclusive range from -5 to 5. Get the sign of every element
belongs to book: MATLAB: A Practical Introduction to Programming and Problem Solving|Stormy Attaway|Fourth Edition| Chapter number:2| Question number:28.2
All Answers
total answers (1)
>> mat = randi([-5,5], 3,5)
mat =
5 4 1 -1 -5
4 4 -1 -3 0
5 -2 1 0 4
>> sign(mat)
ans =
1 1 1 -1 -1
1 1 -1 -1 0
1 -1 1 0 1
need an explanation for this answer? contact us directly to get an explanation for this answer