vba相当于matlab logspace

时间:2017-03-03 11:34:01

标签: vba matlab excel-vba excel

嗨专家请帮助我将日志空间解码为vba

matlab代码为n = 2.^(0:floor(log2(N/2)))';
maxN = n(end); endLogInc = log10(maxN); m = unique(ceil(logspace(0,endLogInc,pts)))';

其中N = 604891且pts为5 Matlab的结果是 n =         1         2         4         8        16        32        64       128       256       512      1024      2048      4096      8192     16384     32768     65536    131072    262144

maxN = 262144 endLogInc = 5.4185 m =

    1
   23
  513
11586

262145

如何在vba中为excel执行相同的操作?

1 个答案:

答案 0 :(得分:0)

您是否尝试过linspace and logspace的实施?