range(3) behavior improvements

range(3) behavior improvements - Messages

#1 Posted: 10/28/2012 10:58:32 AM
Davide Carpi

Davide Carpi

1416 likes in 2873 posts.

Group: Moderator

Hi,

I think that the built-in range(3) function it's a little bit complicated to understand and to handle... I propose as improvement the following behavior (see the attachment)

BTW the endRange value does not necessarily appear in the output vactor


regards,

w3b5urf3r
range(3) - Paint.NET v3.5.10.png
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#2 Posted: 10/28/2012 4:06:24 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

I'd leave it as it is.

The complication which I see is that the start value has to be specified twice, if you want to explicitly specify the increment.

[MATH lang=ENG]range(-2,1,-2+0.3)=mat(-2,-1.7,-1.4,-1.1,-0.8,-0.5,-0.2,0.1,0.4,0.7,10,1)[/MATH]

At least the representation is consistent with MathCad ranges, and also consistent with how one would write a range by hand. However, it took me quite some time when starting with SMath to find out that the range variables are missing and how to specify ranges. AFAIK, in Mathcad there is no function for ranges, just type ; and you get the placeholders.

Would be fine to have that in SMath as well. This would perhaps be impossible if ; is set as arg delimiter. Then a double dot .. would be an intuitive shortcut

Best regards, Martin
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
  • New Posts New Posts
  • No New Posts No New Posts