I hope that I am not messing people arround but:
I got around the problem above this way: new array psden to hold the powers of den from sC to 0
clear all; close all; clc;
syms s
s = tf('s');
H = 1;
num = 1+0j
num = 1
den = [1 3 0] %den =(s^2 + 3s)
den = 1×3
1 3 0
G = tf(num,den)
G =
1
---------
s^2 + 3 s
Continuous-time transfer function.
[sR, sC] = size(den)
sR = 1
sC = 3
psden = sC-1:-1:0 %
psden = 1×3
2 1 0
pG1 = zeros(sR,sC)
pG1 = 1×3
0 0 0
P1 = -1.6+1.6i % the point at which I want the gain value
P1 = -1.6000 + 1.6000i
%therefore "s" = P1
%denPoly = poly2sym(den, s)
K = 0
K = 0
pg = P1.*den % I can multiply the den elements by
pg =
-1.6000 + 1.6000i -4.8000 + 4.8000i 0.0000 + 0.0000i
% the point value P1
% The output looks correct, as a row
% vector
pG1 = pg.^psden
pG1 =
0.0000 - 5.1200i -4.8000 + 4.8000i 1.0000 + 0.0000i
Now pG1(3) does not look correct as any number^0 = 0 can anyone explain this please or am I in error again.