substitution in symbolic.

5 views (last 30 days)
SUBHABRATA Basak
SUBHABRATA Basak on 16 Aug 2022
Commented: Walter Roberson on 16 Aug 2022
How do i replace 's' with j*w in a transfer function and extract the real and imaginary parts of it in terms of w?
  1 Comment
Walter Roberson
Walter Roberson on 16 Aug 2022
What is your input? Is it a tf() ? A zpk()? A ss() ? A symbolic expression ?

Sign in to comment.

Answers (1)

Torsten
Torsten on 16 Aug 2022
Edited: Torsten on 16 Aug 2022
syms s w
assume(w,'real')
f = s + s^2;
fs = subs(f,s,1i*w);
fs_real = real(fs)
fs_real = 
fs_imag = imag(fs)
fs_imag = 
w

Categories

Find more on Symbolic Math Toolbox 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!