Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I adjust 2 variables to minimize the difference between 2 waveforms?
I have a sub that works with a sine wave. It has three variables which
are for the phase and the frequency and total difference in spikes. The sub starts off with a unit circle from zero to 2pi. The variable for the phase is added to the angle and then the sine results are generated. The variable for the frequency is multiplied to the angle and the sine results are generated. In a chart, there is another object that is just spikes. The aptitude is from 0% to 100%. I have 1000 points on the x axis. At each point that is the same on the x axis, the difference of the amplitudes is taken. Then the differences are added up. There is a third variable that sums up the total differences for all the spikes excluding the empty points. The closer a match the 2 waveform are the smaller the total difference becomes. The total difference will never be zero but some number. The MAX aptitudes of both objects are the same. Each object starts & ends @ same points. How do I adjust the phase and frequency variables so that the total difference between both waveforms per valid spikes is minimized? How can I use the same variable names from the original sub in a main sub using the same ending values from the original sub? How can I also have the chart object updated and viewed as the variables are altered? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I adjust 2 variables to minimize the difference between 2 w
The is a great built-in tool called Solver. Checkout Excel Help.
-- Gary''s Student - gsnu2007 "LongBeachGuy" wrote: I have a sub that works with a sine wave. It has three variables which are for the phase and the frequency and total difference in spikes. The sub starts off with a unit circle from zero to 2pi. The variable for the phase is added to the angle and then the sine results are generated. The variable for the frequency is multiplied to the angle and the sine results are generated. In a chart, there is another object that is just spikes. The aptitude is from 0% to 100%. I have 1000 points on the x axis. At each point that is the same on the x axis, the difference of the amplitudes is taken. Then the differences are added up. There is a third variable that sums up the total differences for all the spikes excluding the empty points. The closer a match the 2 waveform are the smaller the total difference becomes. The total difference will never be zero but some number. The MAX aptitudes of both objects are the same. Each object starts & ends @ same points. How do I adjust the phase and frequency variables so that the total difference between both waveforms per valid spikes is minimized? How can I use the same variable names from the original sub in a main sub using the same ending values from the original sub? How can I also have the chart object updated and viewed as the variables are altered? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I minimize | Excel Discussion (Misc queries) | |||
Minimize?? | New Users to Excel | |||
charting a difference of 2 columns' w/o adding a difference column | Charts and Charting in Excel | |||
how do i minimize/maximize a workbook from vba? I want to minimize it durring processing to speed things up a bit | Excel Worksheet Functions | |||
Maximize & Minimize where are you ? | Excel Programming |