Robochameleon  v1.0
pabsang.m
Go to the documentation of this file.
1 
2 function pabsang( varargin )
3 if ~ishold
4  figure;
5 end
6 for i=1:nargin
7  sig = varargin{i};
8  try
9  % Try to generate a time axis if signal_interface
10  t = genTimeAxisSig(sig);
11  labelx = 'Time [s]';
12  catch e
13  % Otherwise just plot, both signal_interface or vector
14  t = 1:length(sig(:,:));
15  labelx = 'Time [samples]';
16  end
17  hold on;
18  subplot(1,2,1);
19  plot(t, abs(sig(:,:)));
20  title('Power envelope [W]');
21  xlabel(labelx);
22  hold on;
23  subplot(1,2,2);
24  plot(t, angle(sig(:,:))/pi);
25  title('Phase [Normalized over pi]');
26  ylim([-1.1 1.1]);
27  xlabel(labelx);
28  hold off;
29 end
30 end
function genTimeAxisSig(in sig, in varargin)
Generate a time axis from signal_interface parameters.
Signal description class.
function pabsang(in varargin)
Fast plot power envelope and phase of signal.