Scilab Function
Last update : 1/11/2005

pwmratio - Pulswidth demodulation

Calling Sequence

[Qratio,pr,km,qpr] = pwmratio(Q)

Parameters

Description

This function can be used to evaluate the ratio between HIGH and LOW phases of a binary input sequence. The input sequence is specified by a row vector containg elements 0 or 1.

Examples

x=rand(1,200,'normal');
[B,A]=butter(8,0.05);
y=mtlb_filter(B,A,x);
yb=bool2s(y>0); // Generate random binary sequence
[Qout,pr,km,qpr]=pwmratio(yb);
k0=0:1:199;
plot2d(k0,yb,style=3);
plot2d(k0,Qout,style=2);
plot2d(k0,qpr,style=7);
disp(pr);
disp(km);
// end of example "pwmratio"

See Also

findgrup ,  

Authors

Dr. Andreas Geissler geisslea@web.de

Used Function

findgrup