Create a 3 x 6 matrix of random integers, each in the range of 50 - 100. Write this to a file called randfile.dat. Then, create a new matrix of random integers, but this time make it a 2 x 6 matrix of random integers, each in the range of 50 - 100
belongs to book: MATLAB: A Practical Introduction to Programming and Problem Solving|Stormy Attaway|Fourth Edition| Chapter number:3| Question number:20.3
All Answers
total answers (1)
>> mat = randi([50,100], 3,6)
mat =
91 96 64 99 98 57
96 82 77 58 74 71
56 54 98 99 90 96
>> save randfile.dat mat -ascii
>> newmat = randi([50,100], 2,6)
newmat =
90 83 93 84 87 83
98 51 97 88 70 58
>> save randfile.dat newmat -ascii -append
>> load randfile.dat
>> randfile
randfile =
91 96 64 99 98 57
96 82 77 58 74 71
56 54 98 99 90 96
90 83 93 84 87 83
98 51 97 88 70 58
need an explanation for this answer? contact us directly to get an explanation for this answer