Given a number n and a base B greater than 1, return the lowest integer power of B that is less than or equal to n.
Example:
B = 4; n = 53; npb = lastpowb(B,n);
outputs
npb = 2
See also: nextpow2, nextpowb
Where did you find nextpowb?
http://www.mathworks.com/matlabcentral/cody/problems/1070-next-higher-power-of-b
Make the vector [1 2 3 4 5 6 7 8 9 10]
29377 Solvers
2723 Solvers
243 Solvers
2125 Solvers
324 Solvers