Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: rfmodel.rational Complex Filter/Input?
Replies: 2   Last Post: Aug 18, 2014 1:15 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Luke

Posts: 2
Registered: 8/14/14
rfmodel.rational Complex Filter/Input?
Posted: Aug 14, 2014 5:39 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi All,

I'm working in Matlab (R2014a) with complex filters (not all complex poles are in conjugate pairs), which I've represented with rfmodel.rational objects. When I run rfmodel.rational.timeresp with these models, I notice that I

a. Get a warning saying "Input U must be a real vector." when I try to use a complex input in my simulations.

b. If I use a real input for these complex filters, my output is real. Applying a complex filter to a real signal should produce a complex signal.

Executing "open('timeresp')", I see these lines in the source code:

if isempty(u) || ~isvector(u) || ~isnumeric(u) || any(isnan(u)) || ...
any(~isreal(u)) || any(isinf(u))
error(message('rf:rfmodel:rational:timeresp:WrongUInput'));
end

and additionally see this line:

y = real(y(:));

So these snippets of code explain why I get the behavior I described above. In the rest of the code though, I can't see a single place where the input vector u would fundamentally need to be real, and I see no reason for y to be made real.

I am planning on just defining my own version of the function which removes these limitations, but I was just wondering if anyone knew of a reason these limits were put into the code to begin with? I am trying to make some relatively precise simulations and do not want to generate false results.

Thanks,
Luke



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.