How to generate logspace numbers but not using logspace function?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
Solved! Go to Solution.
- Labels:
-
Mathcad Usage
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
What did you expect other than i again when you write log(10^i) ???
Maybe this is what you are looking for
Or turned into a user-written LogSpace function
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
What did you expect other than i again when you write log(10^i) ???
Maybe this is what you are looking for
Or turned into a user-written LogSpace function
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Try this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Here's an alternative implementation, called logrange, derived from an old M11 Library.
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
