Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I minimize chrisnsmith Excel Discussion (Misc queries) 8 March 3rd 09 03:56 AM
Minimize?? Doug Mc New Users to Excel 3 January 30th 06 09:03 PM
charting a difference of 2 columns' w/o adding a difference column Wab Charts and Charting in Excel 4 July 27th 05 02:37 AM
how do i minimize/maximize a workbook from vba? I want to minimize it durring processing to speed things up a bit Daniel Excel Worksheet Functions 2 July 9th 05 03:35 AM
Maximize & Minimize where are you ? Don Bowyer Excel Programming 2 July 18th 04 02:41 PM


All times are GMT +1. The time now is 04:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"