You are here: Symbol Reference > SignalUtils Namespace > Functions > SignalUtils.LogRamp Function
DSP Master VCL
ContentsIndex
PreviousUpNext
SignalUtils.LogRamp Function

Compute a logarithmic ramp.

Pascal
procedure LogRamp(const RampVec: TVec; StartPower: double; StopPower: double);

Fills RampVec vector with (base 10) logarithmic scale values from StartPower to StopPower. The number of values returned is defined with RampVec.Length.

Compute 10 values of a logarithmic scale between powers of -1 and +1. 

 

uses MtxExpr, Math387, MtxVec, SignalUtils, MtxVecTee, MtxVecEdit;

procedure TForm1.Button1Click(Sender: TObject);
var RampVec: Vector;
begin
     RampVec.Size(10);
     LogRamp(RampVec,-1,1);
//       RampVec = [0.1     0.1668 0.2782 0.4641 0.7742
//                  1.2915  2.1544 3.5938 5.9948     10]
    ViewValues(RampVec,'Logarithmic scale');
end;

 

  #include "MtxExpr.hpp"
 #include "MtxVecEdit.hpp"
 #include "MtxVecTee.hpp"
 #include "SignalUtils.hpp"

 void __fastcall TForm1::BitBtn1Click(TObject *Sender)
 {
     sVector RampVec;

     RampVec.Length = 10;
     LogRamp(RampVec,-1,1);
     //       RampVec = [0.1     0.1668 0.2782 0.4641 0.7742
     //                  1.2915  2.1544 3.5938 5.9948     10]
     ViewValues(RampVec,"Logarithmic scale");
 }
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!