Generate Random Number, that is that is repeatable
이전 댓글 표시
Hi,
I have generated a code in order to replace the entire original column, with random repeated value but it doesnt give the desired output
% Code is
if range(Selected_Data1(:,1)) ==0
for Iter=1:length(Selected_Data1)
rng(1);
P_MMSI(Iter) = rand(1);
end
end
The above code always replace the value 209026000 with 0.417022004702574, nevertheless, I am expecting the random output vector would be 9 interger numbers (e.g., 781234012)
For example, if the original column is
209026000
209026000
209026000
209026000
209026000
209026000
209026000
209026000
209026000
209026000
% The expected output would be something
781234012
781234012
781234012
781234012
781234012
781234012
781234012
781234012
781234012
채택된 답변
추가 답변 (1개)
카테고리
도움말 센터 및 File Exchange에서 Characters and Strings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!