Histogram only returns one output.
Afficher commentaires plus anciens
I am trying to plot a histogram that shows the first digit of any generated number, but when I run the code, it only plots for the last output. For example, if I run the code and the last value for out is 5, the histogram will only plot the 5. Any suggestions?
rng('shuffle')
A = randperm(100,10)
for X = A;
Y = num2str(X)
out = str2num(Y(1))
for out = str2num(Y(1))
histogram(X,9)
end
end
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Histograms dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
