A matrix in symbolic mode will evaluate it in numeric mode

2 views (last 30 days)
Dear
A matrix of a dynamic system, with the symbolic mode, could be discretized with the ZOH method. I want the symbolic components of the discretized matrix, evaluate them and as a result obtain the matrix with the numerical values in order to later simulate the response of the dynamic system.
I attach the code.
Thank you
JuanMa
clear;
syms CinvS LinvS TinvS
A = [0, -1/LinvS; 1/CinvS, 0]
Ad = expm(TinvS * A)
Ai = [0, -1/LinvS; 1/CinvS, 0]
Bi = [1/LinvS; 0]
Bo = [0; -1/CinvS]
Ms = [Ai, Bi, Bo; 0, 0, 0, 0; 0, 0, 0, 0]
Mds = expm(Ms * TinvS)
% Parameters
Linv = 621.26e-6;
Cinv = 10e-6;
Tinv = 50e-6;

Answers (0)

Categories

Find more on Symbolic Math Toolbox in Help Center and File Exchange

Products


Release

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!