loop of powers
Show older comments
pval = [1e-24 1e-23 1e-22 1e-21 1e-20]
How can I initialize such an array by inputting only -24 and -20? Many thanks for your time.
Answers (2)
Sean de Wolski
on 15 Jun 2012
p = 1*10.^[-24:1:-20]
Walter Roberson
on 15 Jun 2012
logspace(-24, -20, 5)
Categories
Find more on MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!