Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • log forvalues

    while
    Code:
    forvalues i = 10(10)200 {
    works great, and increments i linearly, is it possible to easily do the same with logarithmic increments instead of linear increments, i.e. increment i from log(10) to log(200) with steps of 10, therefore log(10), log(20) all the way to log(200)?

    Or perhaps the "best" way is to do
    Code:
    local j=log(`i')
    within the loop and use j as the "increment" here? Let me know, I'm curious to hear about alternative ways to solve this. Thank you!

  • #2
    I would refer to the logarithm inside the loop and avoid putting it in another local macro.

    Comment


    • #3
      thank you Nick

      Comment

      Working...
      X