MATLAB: How to create range of random elements for a single element in MATLAB

MATLABrandom number generatorrandom observation for single element

I have a 21 x 21 matrix and needing to generate 1-120 random observations (milliseconds) for each element in the array

Best Answer

%Still not getting the exact question, are you looking for this one?
%x1-Min voltage value x2-Max voltage value
clc;clear;close all;
v=randi([0 1], 21 , 21);
for i=1:120
x=(0.12-0.001).*rand(1,1) + 0.001;
v(:,:)=x
pause(0.001);
end
Related Question