Robochameleon  v1.0
preim.m
Go to the documentation of this file.
1 
2 function preim( 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, real(sig(:,:)));
20  title('Real part');
21  xlabel(labelx);
22  hold on;
23  subplot(1,2,2);
24  plot(t, imag(sig(:,:)));
25  title('Imaginary part');
26  xlabel(labelx);
27  hold off;
28 end
29 end
function genTimeAxisSig(in sig, in varargin)
Generate a time axis from signal_interface parameters.
Signal description class.
function preim(in varargin)
Fast plot real and imaginary part of signal.