The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
[SOLVED] Issue with cZeros
02-05-2017, 11:06 AM (This post was last modified: 02-05-2017 12:06 PM by tiamattia.)
Post: #1
[SOLVED] Issue with cZeros
Hello,

I'm developing a program to design filters using Butterworth and Chebyshev type I. To do this i defined some cas function to solve equations or denormalize things. Some of these functions are:
Code:

BP_Denorm_TF(n_filter_gain, n_filter_poles, w_central, filter_q_factor) :=
BEGIN
 cFactor(normal(n_filter_gain/ poly2symb(pcoeff(n_filter_poles), filter_q_factor * (x ^ 2 + w_central ^ 2) / (w_central * x)))); // BP transfer function
END;

BP_Denorm_Zeros(n_filter_gain, n_filter_poles, w_central, filter_q_factor) :=
BEGIN
 cZeros(BP_Denorm_TF(n_filter_gain, n_filter_poles, w_central, filter_q_factor));
END;
Use this as argument (1.002377293,{−0.707946782251-0.707946782251*i,−0.707946782251+0.707946782251*i},30781195.9239,2.44948974278)

BP_Denorm_TF works right also inside of a program.
Instead, BP_Denorm_Zeros is not working as it should inside of a program.
If i call this function directly from cas, everything works, the result is two zeros in the origin.
If i call this function inside of a program, no solutions are returned.

What's the problem?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
[SOLVED] Issue with cZeros - tiamattia - 02-05-2017 11:06 AM
RE: Issue with cZeros - tiamattia - 02-05-2017, 11:31 AM



User(s) browsing this thread: 1 Guest(s)