Frequency Response
$begingroup$
How to plot frequency response which includes magnitude response and phase response of a transfer function in Mathematica?
In Matlab, we can use [h,k]=freqz(b, a, N); to generate magnitude response we can plot abs(h) and to plot phase we can do it by angle(h).
So is there any kind of alternative for this Mathematica?
Example : 2y(n-2)+5y(n-1)+7y(n) = 3x(n-1)+5x(n)
matlab mathematica-online grid-mathematica
New contributor
Ajay Dyavathi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
add a comment |
$begingroup$
How to plot frequency response which includes magnitude response and phase response of a transfer function in Mathematica?
In Matlab, we can use [h,k]=freqz(b, a, N); to generate magnitude response we can plot abs(h) and to plot phase we can do it by angle(h).
So is there any kind of alternative for this Mathematica?
Example : 2y(n-2)+5y(n-1)+7y(n) = 3x(n-1)+5x(n)
matlab mathematica-online grid-mathematica
New contributor
Ajay Dyavathi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
$begingroup$
Welcome to Mathematica SE. If you want good answers, please provide a minimal example of a differential equation so that people can demonstrate Mathematica's capabilities more concretely.
$endgroup$
– Roman
1 hour ago
add a comment |
$begingroup$
How to plot frequency response which includes magnitude response and phase response of a transfer function in Mathematica?
In Matlab, we can use [h,k]=freqz(b, a, N); to generate magnitude response we can plot abs(h) and to plot phase we can do it by angle(h).
So is there any kind of alternative for this Mathematica?
Example : 2y(n-2)+5y(n-1)+7y(n) = 3x(n-1)+5x(n)
matlab mathematica-online grid-mathematica
New contributor
Ajay Dyavathi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
How to plot frequency response which includes magnitude response and phase response of a transfer function in Mathematica?
In Matlab, we can use [h,k]=freqz(b, a, N); to generate magnitude response we can plot abs(h) and to plot phase we can do it by angle(h).
So is there any kind of alternative for this Mathematica?
Example : 2y(n-2)+5y(n-1)+7y(n) = 3x(n-1)+5x(n)
matlab mathematica-online grid-mathematica
matlab mathematica-online grid-mathematica
New contributor
Ajay Dyavathi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Ajay Dyavathi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 1 hour ago
Ajay Dyavathi
New contributor
Ajay Dyavathi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 1 hour ago
Ajay DyavathiAjay Dyavathi
62
62
New contributor
Ajay Dyavathi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Ajay Dyavathi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Ajay Dyavathi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$begingroup$
Welcome to Mathematica SE. If you want good answers, please provide a minimal example of a differential equation so that people can demonstrate Mathematica's capabilities more concretely.
$endgroup$
– Roman
1 hour ago
add a comment |
$begingroup$
Welcome to Mathematica SE. If you want good answers, please provide a minimal example of a differential equation so that people can demonstrate Mathematica's capabilities more concretely.
$endgroup$
– Roman
1 hour ago
$begingroup$
Welcome to Mathematica SE. If you want good answers, please provide a minimal example of a differential equation so that people can demonstrate Mathematica's capabilities more concretely.
$endgroup$
– Roman
1 hour ago
$begingroup$
Welcome to Mathematica SE. If you want good answers, please provide a minimal example of a differential equation so that people can demonstrate Mathematica's capabilities more concretely.
$endgroup$
– Roman
1 hour ago
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
In Mathematica, you can work with the function h(z) directly, since Mathematica is symbolic based. In other words, while in Matlab one needs to work for numerical values of coefficients of numerator and denominator and make sure they are in the correct order and so on, in Mathematica, you work with the actual formula or expression itself (transfer function, either in s or z domain).
I just looked at example in Matlab home page for freqz, which used [h,w] = freqz(b,a,'whole',2001); and duplicated the output. This just gives you a start.

In Mathematica:

The code is
h[z_] := (0.05634*(1 + 1/z)*(1 - 1.0166/z + 1/z^2))/((1 -
0.683/z)*(1 - 1.4461/z + 0.7957/z^2));
sys = TransferFunctionModel[h[z], z, SamplingPeriod -> 1];
BodePlot[sys, {0.43, 6}]
There are many options you can adjust for scaling and units and such. See BodePlot and TransferFunctionModel
$endgroup$
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "387"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Ajay Dyavathi is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f197280%2ffrequency-response%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
In Mathematica, you can work with the function h(z) directly, since Mathematica is symbolic based. In other words, while in Matlab one needs to work for numerical values of coefficients of numerator and denominator and make sure they are in the correct order and so on, in Mathematica, you work with the actual formula or expression itself (transfer function, either in s or z domain).
I just looked at example in Matlab home page for freqz, which used [h,w] = freqz(b,a,'whole',2001); and duplicated the output. This just gives you a start.

In Mathematica:

The code is
h[z_] := (0.05634*(1 + 1/z)*(1 - 1.0166/z + 1/z^2))/((1 -
0.683/z)*(1 - 1.4461/z + 0.7957/z^2));
sys = TransferFunctionModel[h[z], z, SamplingPeriod -> 1];
BodePlot[sys, {0.43, 6}]
There are many options you can adjust for scaling and units and such. See BodePlot and TransferFunctionModel
$endgroup$
add a comment |
$begingroup$
In Mathematica, you can work with the function h(z) directly, since Mathematica is symbolic based. In other words, while in Matlab one needs to work for numerical values of coefficients of numerator and denominator and make sure they are in the correct order and so on, in Mathematica, you work with the actual formula or expression itself (transfer function, either in s or z domain).
I just looked at example in Matlab home page for freqz, which used [h,w] = freqz(b,a,'whole',2001); and duplicated the output. This just gives you a start.

In Mathematica:

The code is
h[z_] := (0.05634*(1 + 1/z)*(1 - 1.0166/z + 1/z^2))/((1 -
0.683/z)*(1 - 1.4461/z + 0.7957/z^2));
sys = TransferFunctionModel[h[z], z, SamplingPeriod -> 1];
BodePlot[sys, {0.43, 6}]
There are many options you can adjust for scaling and units and such. See BodePlot and TransferFunctionModel
$endgroup$
add a comment |
$begingroup$
In Mathematica, you can work with the function h(z) directly, since Mathematica is symbolic based. In other words, while in Matlab one needs to work for numerical values of coefficients of numerator and denominator and make sure they are in the correct order and so on, in Mathematica, you work with the actual formula or expression itself (transfer function, either in s or z domain).
I just looked at example in Matlab home page for freqz, which used [h,w] = freqz(b,a,'whole',2001); and duplicated the output. This just gives you a start.

In Mathematica:

The code is
h[z_] := (0.05634*(1 + 1/z)*(1 - 1.0166/z + 1/z^2))/((1 -
0.683/z)*(1 - 1.4461/z + 0.7957/z^2));
sys = TransferFunctionModel[h[z], z, SamplingPeriod -> 1];
BodePlot[sys, {0.43, 6}]
There are many options you can adjust for scaling and units and such. See BodePlot and TransferFunctionModel
$endgroup$
In Mathematica, you can work with the function h(z) directly, since Mathematica is symbolic based. In other words, while in Matlab one needs to work for numerical values of coefficients of numerator and denominator and make sure they are in the correct order and so on, in Mathematica, you work with the actual formula or expression itself (transfer function, either in s or z domain).
I just looked at example in Matlab home page for freqz, which used [h,w] = freqz(b,a,'whole',2001); and duplicated the output. This just gives you a start.

In Mathematica:

The code is
h[z_] := (0.05634*(1 + 1/z)*(1 - 1.0166/z + 1/z^2))/((1 -
0.683/z)*(1 - 1.4461/z + 0.7957/z^2));
sys = TransferFunctionModel[h[z], z, SamplingPeriod -> 1];
BodePlot[sys, {0.43, 6}]
There are many options you can adjust for scaling and units and such. See BodePlot and TransferFunctionModel
edited 27 mins ago
answered 38 mins ago
NasserNasser
59.1k491208
59.1k491208
add a comment |
add a comment |
Ajay Dyavathi is a new contributor. Be nice, and check out our Code of Conduct.
Ajay Dyavathi is a new contributor. Be nice, and check out our Code of Conduct.
Ajay Dyavathi is a new contributor. Be nice, and check out our Code of Conduct.
Ajay Dyavathi is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Mathematica Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f197280%2ffrequency-response%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
$begingroup$
Welcome to Mathematica SE. If you want good answers, please provide a minimal example of a differential equation so that people can demonstrate Mathematica's capabilities more concretely.
$endgroup$
– Roman
1 hour ago