Robochameleon  v1.0
Functions
getPColFromNumeric_v1.m File Reference

Construct array of pwr objects from a numeric signal. More...

Go to the source code of this file.

Functions

function getPColFromNumeric_v1 (in waveform, in varargin)
 Construct array of pwr objects from a numeric signal. More...
 

Detailed Description

Construct array of pwr objects from a numeric signal.

This is a utility function to help in constructing signal_interface objects that have waveform-defined power scaling.

Example

Generate a dummy waveform with a specified peak-peak voltage
vpp = 4;
testsig = randn(100, 2);
testsig(testsig>0) = vpp/2;
testsig(testsig<0) = -vpp/2;
testsig(:,2) = testsig(:,2)*0.5;
%Use function
[PCol] = getPColFromNumeric_v1(testsig, [10, 30].');
%Construct signal_interface object using waveform and new PCol
sigparams.Fs = 1;
sigparams.Rs = 1;
sigparams.Fc = 0;
sigparams.PCol = PCol;
test_signal = signal_interface(testsig, sigparams);
%Check performance
preim(test_signal)
Author
Molly Piels
See also
signal_interface
pwr
Version
1

Definition in file getPColFromNumeric_v1.m.

Function Documentation

function getPColFromNumeric_v1 ( in  waveform,
in  varargin 
)

Construct array of pwr objects from a numeric signal.

This is a utility function to help in constructing signal_interface objects that have waveform-defined power scaling.

Parameters
waveformArray of signal waveforms (each column is an independent signal) [unit].
SNRSignal-to-noise ratio of output pwr object. Can be passed as an array or scalar value [dB]. [Default: inf]
Return values
PColArray of pwr objects with power set from raw waveform