How can I convert a transfer function object into a symbolic object for use with the Symbolic Math Toolbox in MATLAB R2023a?
Show older comments
I have two transfer function objects in MATLAB R2023a. The first one, "sysd", was created using the System Identification Toolbox with the following code:
x = rand(100, 1);
y = 10*rand(100, 1) + 5;
np = 4; % number of poles
nz = 2; % number of zeros
Ts = 0.01; % time step
sysd = tfest(x, y, np, nz, 'Ts', Ts); % Get transfer function
The second transfer function object, "t", was created using the code:
t = tf(1:3,4:6)
Transfer function:
s^2 + 2 s + 3
---------------
4 s^2 + 5 s + 6
I want to convert both transfer function objects into symbolic objects for use with the Symbolic Math Toolbox. This will allow me to use functions like CCODE, FORTRAN, or LATEX on the transfer functions. How can I achieve this?
Please provide the necessary code for converting both "sysd" and "t" into symbolic objects and demonstrate how to use the CCODE, FORTRAN, or LATEX functions on the resulting symbolic expressions.
Accepted Answer
More Answers (0)
Categories
Find more on Conversion in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!