Skip to main content
19-Tanzanite
December 26, 2024
Solved

How to generate logspace numbers but not using logspace function?

  • December 26, 2024
  • 2 replies
  • 1099 views

Hello,

I want to find a way to replicate the function of logspace but using numbers, log function, usual math operators only.

Cornel_0-1735221254336.png

 

Best answer by Werner_E

What did you expect other than i again when you write log(10^i) ???

 

Maybe this is what you are looking for

Werner_E_0-1735224307916.png

 

Or turned into a user-written LogSpace function

Werner_E_2-1735224600425.png

 

 

 

2 replies

Werner_E25-Diamond IAnswer
25-Diamond I
December 26, 2024

What did you expect other than i again when you write log(10^i) ???

 

Maybe this is what you are looking for

Werner_E_0-1735224307916.png

 

Or turned into a user-written LogSpace function

Werner_E_2-1735224600425.png

 

 

 

Cornel19-TanzaniteAuthor
19-Tanzanite
December 26, 2024

@Werner_E wrote:

What did you expect other than i again when you write log(10^i) ???


Was only as to write something, to show with what math functions only I want to obtain the same result as Prime function logspace gave.
Thank you.

Cornel19-TanzaniteAuthor
19-Tanzanite
December 26, 2024

@Werner_E  there is a way making a similar program as LogSpace also for logpts Mathcad function?

Cornel_0-1735225542313.png

 

23-Emerald V
December 26, 2024

Here's an alternative implementation, called logrange, derived from an old M11 Library.

 

2024 12 26 A.png

 

The name "logspace" for the Mathcad function seems to run counter to that of several other programming languages, eg Matlab and Python (NumPy). 

 

The local function logspace in logrange behaves the same as the Matlab/NumPy function logspace, whilst logrange behaves like NumPy's geomspace.   

 

You can make logrange's linspace and logspace into functions in their own right (indeed, logrange is defined in terms of linspace, another function funspace, and logspace in my Mathcad library).

 

Stuart