Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



sym2poly error
Posted:
Jul 15, 2014 3:59 PM


I'm evaluating a circuit in matlab, and I need to create a transfer function from an cell array of data. The circuit data is saved as a cell array and I can get the ratio of the output voltage to the input voltage.
This is the relevant section of code: [n,d] = numden(eval(v_3/V));
transH = tf(sym2poly(n),sym2poly(d));
the weird part is that this works for some sets of v_3 and V and not for other sets. I am still getting an array for n and d as well.
The error I am receiving is:
Error using sym/sym2poly (line 28) Not a polynomial.
Error in CircuitGA (line 349) n = sym2poly(n);
Any help/alternative functions I can use?



