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.
|