vector to sys transformation for bode plot

Asked by aaa on 1 Jul 2012
Latest activity Commented on by aaa on 23 Jul 2012

Hi,

As background, I am trying to use the bode() function.

I know that you can extract vectors from a bode(sys) by doing

[mag phase wout] = bode(sys)

but if i have a vector c, can i turn that into a sys and then do a bode?

Although I think this doesn't really make sense because the vector c does not carry enough information to be in the 'sys' form, but my goal is to divide something that is 'sys' with c. However, Matlab doesn't seem to like this and gives the following error.

??? Error using ==> DynamicSystem.mrdivide at 58
In "SYS1/SYS2", the LTI model SYS2 must have the same number of inputs as
outputs.

How can i resolve this issue such that i can perform the function 'sys' (a transfer function) divided by c (a vector)?

0 Comments

aaa

Products

No products are associated with this question.

1 Answer

Answer by Craig on 20 Jul 2012
Edited by Craig on 20 Jul 2012
Accepted answer

What is the dimension of the final system are you trying to get?

For example,

sys = tf(1,[1,1]);
c = 1:10;
1./c*sys

results into a 10 input and 10 output system.

or

c = 1:10;
sys = tf(1,[1,1])
for ct = 1:length(c)
   sysvec(:,:,ct) = sys/c(ct);
end

which is a ten element array of 1 input and 1 output systems.

1 Comment

aaa on 23 Jul 2012

i think it may be the latter. i will try this and see what results i get. Thanks Craig.

Craig

Contact us