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.