Multiplex and demultiplex test.
uses MtxExpr, Math387, MtxVec, SignalUtils, MtxVecTee, MtxVecEdit; procedure TForm1.Button1Click(Sender: TObject); var b,h,c: Vector; begin h := Ramp(6,mvDouble,0,1); // h = [0 1 2 3 4 5] Multiplex(h,b,3,2); // b = [0 0 0 0 0 1 0 0 2 0 0 3 0 0 4 0 0 5] Demultiplex(b,c,3,2); // c = [0 1 2 3 4 5] DrawIt(c); end;
#include "MtxExpr.hpp" #include "MtxVecEdit.hpp" #include "MtxVecTee.hpp" #include "SignalUtils.hpp" #include <string.h> void __fastcall TForm41::BitBtn1Click(TObject *Sender) { sVector b,h,c; h = Ramp(6,mvDouble,0,1); // h = [0 1 2 3 4 5] Multiplex(h,b,3,2); // b = [0 0 0 0 0 1 0 0 2 0 0 3 0 0 4 0 0 5] Demultiplex(b,c,3,2); // c = [0 1 2 3 4 5] DrawIt(c); }
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
|