How to manipulate the vector prob5 = rand(1,6) to create a new vector of values that range from 10 through 20?
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
How to manipulate the vector prob5=rand(1,6) to create a new vector of values that range from 10 through 20?
0 Commenti
Risposte (1)
Image Analyst
il 25 Nov 2015
it's just very simple algebra:
prob5=rand(1,6)
minp = min(prob5)
maxp = max(prob5)
out = 10 + 10 * (prob5 - minp) / (maxp-minp)
0 Commenti
Vedere anche
Categorie
Scopri di più su Interpolation of 2-D Selections in 3-D Grids in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!