Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline birikov  
#1 Posted : 16 May 2020 18:47:52(UTC)
birikov

Rank: Newbie

Groups: Registered
Joined: 16/05/2020(UTC)
Posts: 2
Russian Federation

Was thanked: 2 time(s) in 1 post(s)
A function that improves the normal range().

This is almost a normal range(), but it can plot a span from non-integers with a configurable step. Moreover, any numbers can be substituted inside the interval.

There are examples inside.




Get Range 3.sm (719kb) downloaded 34 time(s).

You can put the file in the snippet folder to quickly add it to any project.

I don't know much English, so I write through a translator. Russian forum is closed so I write here.

Edited by user 16 May 2020 20:49:14(UTC)  | Reason: Not specified

thanks 2 users thanked birikov for this useful post.
on 16/05/2020(UTC),  on 16/05/2020(UTC)

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline Jean Giraud  
#2 Posted : 16 May 2020 20:34:46(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Interesting, but can't see any use in real project.

idx.sm (7kb) downloaded 20 time(s).
Offline mkraska  
#3 Posted : 16 May 2020 21:46:20(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,986
Germany

Was thanked: 1124 time(s) in 721 post(s)
As I understand, the main objective is to have ranges with custom extra values.
Yet, given the size of the procedure, it must be much smarter than this:

re.png
re.sm (4kb) downloaded 11 time(s).
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
thanks 1 user thanked mkraska for this useful post.
on 16/05/2020(UTC)
Offline birikov  
#4 Posted : 16 May 2020 22:02:43(UTC)
birikov

Rank: Newbie

Groups: Registered
Joined: 16/05/2020(UTC)
Posts: 2
Russian Federation

Was thanked: 2 time(s) in 1 post(s)
Originally Posted by: mkraska Go to Quoted Post
As I understand, the main objective is to have ranges with custom extra values.
Yet, given the size of the procedure, it must be much smarter than this:

re.png
re.sm (4kb) downloaded 11 time(s).



Wow, this is cool and so easy. I didn't realize it before.

And I understood why this option did not suit me. I needed to build a range that could start with a non-integer and end with a non-integer, but the main step should be an integer. That is, so that you can start with 0.99, and then the step becomes an integer. At the same time, it was necessary to change the step.

And inside non-integers as a bonus, just because the sorting function can do it.

There is probably a simpler solution, but I haven't found it.



I just needed a similar feature at the University and decided to share it here. Maybe it will be useful to someone.
Offline mkraska  
#5 Posted : 16 May 2020 22:17:45(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,986
Germany

Was thanked: 1124 time(s) in 721 post(s)
Originally Posted by: birikov Go to Quoted Post
I needed to build a range that could start with a non-integer and end with a non-integer, but the main step should be an integer. That is, so that you can start with 0.99, and then the step becomes an integer. At the same time, it was necessary to change the step.

And inside non-integers as a bonus, just because the sorting function can do it.

There is probably a simpler solution, but I haven't found it.



I just needed a similar feature at the University and decided to share it here. Maybe it will be useful to someone.


This might be a first approach...

re1.png
re1.sm (4kb) downloaded 19 time(s).
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
thanks 1 user thanked mkraska for this useful post.
on 16/05/2020(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.