Process an Array in Ruby
Posted: Tue Oct 18, 2016 8:26 am
Hi All,
Basically I want to find the sin([array]) (sine of each value in the array) and then export the array from ruby.
I can find the sine of a float but my code wont do the same to an array. Ruby comes up with an error something like "cant convert array to float".
I think I may need to iterate through the array, processing one at a time but I cant work out how to do that.
Ollie
Basically I want to find the sin([array]) (sine of each value in the array) and then export the array from ruby.
I can find the sine of a float but my code wont do the same to an array. Ruby comes up with an error something like "cant convert array to float".
I think I may need to iterate through the array, processing one at a time but I cant work out how to do that.
Ollie