Generate Random Number, that is that is repeatable
Mostra commenti meno recenti
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
Risposta accettata
Più risposte (1)
Categorie
Scopri di più su Creating and Concatenating Matrices in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!