Replace a symbolic variable with a symbolic expression

1 回表示 (過去 30 日間)
Gennaro Arguzzi
Gennaro Arguzzi 2017 年 7 月 3 日
コメント済み: Gennaro Arguzzi 2017 年 7 月 3 日
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.

回答 (1 件)

John D'Errico
John D'Errico 2017 年 7 月 3 日
Subs does this directly.
help subs
  1 件のコメント
Gennaro Arguzzi
Gennaro Arguzzi 2017 年 7 月 3 日
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.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by