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)?
No products are associated with this question.
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.
0 Comments