cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

How to generate logspace numbers but not using logspace function?

Cornel
19-Tanzanite

How to generate logspace numbers but not using logspace function?

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

 

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:Cornel)

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

 

 

 

View solution in original post

5 REPLIES 5
Werner_E
25-Diamond I
(To:Cornel)

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

 

 

 

Cornel
19-Tanzanite
(To:Werner_E)


@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.

Cornel
19-Tanzanite
(To:Cornel)

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

Cornel_0-1735225542313.png

 

Werner_E
25-Diamond I
(To:Cornel)

Try this

Werner_E_0-1735231586283.png

 

StuartBruff
23-Emerald III
(To:Cornel)

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 

Announcements

Top Tags