(adsbygoogle = window.adsbygoogle || []).push({}); Rotate an array

hi everyone

I'm hoping someone maybe able to help me/ point me in the right direction with the rotation of data from an array. I'll try to keep it short but my maths skills are seriously not good due to my old age and inexperience. I maybe approaching it from the wrong angle and punching well above my weight. I'm pretty good at addition and subtraction even though sometimes I get stuck on division.

Here is a link to a spreadsheet I’m working on which hopefully will eventually end up in a program controlling a DAC for a ADSR

http://imgur.com/nAPHS3j

Column A represents a wave in voltage x being time y being voltage.

It is irrelevant what shape this is for it might be a straight line ..etc. etc.

What interests me is its entry and exit voltage which are normally 100

I have found through a lot of trial and error if I use the charts on the right (Rotate Chart & Add to F Chart) I can look up values and determine a different entry and exit voltage by rotating the wave.

So for example if I wanted a entry of 300 and an exit of 200. I would use the value in cell L5 for Rotate which is 3.3 and the value in cell L18 for the Add to F which is 150.

Now normally with a problem like this I would code a kinda lookup 3 dimensional array to get these values. But the real DAC has a voltage number range of 0-4095 which would mean an array size of 4095 raised to power 3. I think …..which is to much data for the processor I am using to store.

In this example I reduced it to 0-100 so I could see what is going on.

So my question is in an ideal world I would enter a value for the entry point and enter a value for the exit point and there would be some sort of equation which could work out from those 2 values the Rotate number and hopefully the Add to F number.

I've been stuck on this for a while hence the plea for help.

I think i tried all the functions in excel and watch you tube videos on rotation . but most of the ones i understand involve an extension of reflection

I'm not to interested in the distortion of the wave as I quiet like it (if that makes sense)

thanks for reading

thanking you in advance for any guidance you can give

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Rotate an array

Loading...

Similar Threads - Rotate array | Date |
---|---|

B Complex products: perpendicular vectors and rotation effects | Dec 17, 2017 |

B Index numbers vs. Quantity in a group | Oct 13, 2017 |

I Calculating transferred spin | Apr 26, 2017 |

B Help Me Understand Rotation from an Arbitrary basis | Jan 2, 2017 |

**Physics Forums - The Fusion of Science and Community**