logspace boundary of 2*10^b
4 views (last 30 days)
Show older comments
Jan Kowalski
on 27 Nov 2014
Commented: Jan Kowalski
on 28 Nov 2014
I want to create logarithmically spaced vector of n points between 10^a and 2*10^b , can i use logspace somehow for this? I don't know how to set this 2*10^b boundary. Maybe some other function?
0 Comments
Accepted Answer
the cyclist
on 28 Nov 2014
2*10^b is equal to (10^log10(2))*10^b which is equal to 10^(b+log10(2)), so
n = 20;
a = 3;
b = 4;
logspace(a,b+log10(2),n)
gives 20 equally-spaced points from 10^3 and 2*10^4.
More Answers (0)
See Also
Categories
Find more on Creating and Concatenating Matrices 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!