If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
logarithms in ruby - working?
9 posts
• Page 1 of 1
logarithms in ruby - working?
Something like this.
Does it requires something else?
Does it requires something else?
- Attachments
-
- ruby-log.fsm
- (324 Bytes) Downloaded 759 times
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Feel free to donate. Thank you for your contribution.
- tester
- Posts: 1786
- Joined: Wed Jan 18, 2012 10:52 pm
- Location: Poland, internet
Re: logarithms in ruby - working?
Need my support for app development, website or custom scripts?
PM me if you are interested.
Experienced Java, J2EE, PHP, Javascript, Angular, Cloud Solutions developer.
PM me if you are interested.
Experienced Java, J2EE, PHP, Javascript, Angular, Cloud Solutions developer.
-
CoreStylerz - Posts: 327
- Joined: Sun Jan 22, 2012 2:19 am
- Location: italy
Re: logarithms in ruby - working?
Nope, not with array that way.
- Attachments
-
- ruby-log.fsm
- (330 Bytes) Downloaded 750 times
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Feel free to donate. Thank you for your contribution.
- tester
- Posts: 1786
- Joined: Wed Jan 18, 2012 10:52 pm
- Location: Poland, internet
Re: logarithms in ruby - working?
you need to do it with each array element, using 'each' in a oneliner like this:
- Code: Select all
output 0,@arr.each_index{|i|@arr[i]=Math.log(@arr[i],2)}
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
Re: logarithms in ruby - working?
Okay, thanks on that.
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Feel free to donate. Thank you for your contribution.
- tester
- Posts: 1786
- Joined: Wed Jan 18, 2012 10:52 pm
- Location: Poland, internet
Re: logarithms in ruby - working?
Good stuff NuBeat !!
Thanks for helping us all
Thanks for helping us all
- RJHollins
- Posts: 1571
- Joined: Thu Mar 08, 2012 7:58 pm
Re: logarithms in ruby - working?
There is one problem.
At each restart I get an error (see attached pic) and must retrig the module.
At each restart I get an error (see attached pic) and must retrig the module.
- Attachments
-
- Image1.png (8.94 KiB) Viewed 13698 times
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Feel free to donate. Thank you for your contribution.
- tester
- Posts: 1786
- Joined: Wed Jan 18, 2012 10:52 pm
- Location: Poland, internet
Re: logarithms in ruby - working?
hmm looks like it does the operation on loading, also when you click insideand change space or something it recalculates the array which contains the already processed values, like this the values are getting smaller till they are aout of range (minus)
just put it in an event methode, to only get triggered from input, i think this should solve the problem ( it does here )
just put it in an event methode, to only get triggered from input, i think this should solve the problem ( it does here )
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
Re: logarithms in ruby - working?
I added afterload/dupkicate triggers for input, works too (no error display in schematic).
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Feel free to donate. Thank you for your contribution.
- tester
- Posts: 1786
- Joined: Wed Jan 18, 2012 10:52 pm
- Location: Poland, internet
9 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 75 guests