Replace a symbolic variable with a symbolic expression

1 Ansicht (letzte 30 Tage)
Gennaro Arguzzi
Gennaro Arguzzi am 3 Jul. 2017
Kommentiert: Gennaro Arguzzi am 3 Jul. 2017
Hi eveyone. I've the following code:
close all
clear all
syms t
Y=fourier(heaviside(t));
The result is Y = pi*dirac(w) - 1i/w. My goal is to replace w with 2*pi*f. How can I do that?
Thank you for your help.

Antworten (1)

John D'Errico
John D'Errico am 3 Jul. 2017
Subs does this directly.
help subs
  1 Kommentar
Gennaro Arguzzi
Gennaro Arguzzi am 3 Jul. 2017
Hi John D'Errico, I just tried with subs, but it works only if the first input is pi*dirac(w) - 1i/w. Instead in my code I have Y.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by