필터 지우기
필터 지우기

Sematics of freqz in Help

조회 수: 3 (최근 30일)
Max Yaffe
Max Yaffe 2023년 4월 13일
댓글: Gokul Nath S J 2023년 4월 24일
Looking at freqz in the help system there are several ways to invoke the function:
[h,w] = freqz(b,a,n) % 2 real coefficients vectors, and # of points
[h,w] = freqz(sos,n) % 1 sections-matrix, and # of points
[h,w] = freqz(d,n) % 1 matrix containing row of b's and row of a's, and # of points
[h,w] = freqz(___,n,'whole') % any of the above with n points around unit circle from 0 to 2pi
[h,f] = freqz(___,n,fs) % as above but frequencies normalized to fs
What is the meaning of the '___'?
My best guess is that Matlab implies the signature of the function based on the data types of the arguments, and that '___' could be either 'b,a' or 'sos' or 'd'
Is this correct? Are there any other string parameters that freqz could take?
  댓글 수: 1
Paul
Paul 2023년 4월 13일
Hi Max,
I too am often confused by this. Too bad there's not a doc page in the doc that explains how to interpret the syntax section of doc page of a function. At least I've not been able to find it.

댓글을 달려면 로그인하십시오.

답변 (1개)

Gokul Nath S J
Gokul Nath S J 2023년 4월 20일
편집: Gokul Nath S J 2023년 4월 20일
Hi Max,
Based on your question, it seems that you would like to know the meanig of '___'. Basically the notation '___' is used when documentation is emphasising on the arguments coming after '___', so that there won't be much confusion on which part of the argument the document is refering to.
For an example, if the following code is considered, the document is giving emphasis on the argument w itself.
h = freqz(___, w)
By using such a notation, there won't be any confusion on which part of the function, the document is refering to. Further, as you suggested '___', can imply any other argument which is currently out of relevance while mentioning a particular argument field
Thanks,
Gokul Nath S J
  댓글 수: 4
Max Yaffe
Max Yaffe 2023년 4월 23일
Thanks for the answers Gokul, but the semantics are not consistent and open to interpretation.
For example in "[h,w] = freqz(___,n,'whole')" could mean b,a or sos, or d, with the callee implying which using argument type.
By argument type, I also imply if a string like 'whole' is found (anywhere?), it is interpreted as an ad hoc control parameter.
But what does '____' mean in h = freqz(___,w)? Does it include the 'n'? does it include 'fs'?
Gokul Nath S J
Gokul Nath S J 2023년 4월 24일
Hi Max,
It is true that, once it depicts '____', the users are not sure which input arguments does it mean as you have mentioned as it could be b, a or sos or d. However, the purpose of [h, w] = freqz(___, w) can include n as well as fs but the main concern is defining the parameter w.
Thanks
Gokul Nath S J

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Get Started with Signal Processing Toolbox에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by