Getting Real & Imaginary Numbers From Nyquist(Sys)
조회 수: 16 (최근 30일)
이전 댓글 표시
Hi,
The Nyquist command return the real and imaginary numbers of the frequency response of a transfer function SYS in a matrix [RE, IM]
[RE, IM] = Nyquist(SYS);
I had assumed that the [RE, IM] is a matrix of values and I'm trying to get print out the real and imaginary numbers. But according to the LENGTH and SIZE commands the length of the matrix is 1. I get the following value when trying to assess the number of elements, rows or columns in the matrix:
I don't understand what is happening here. Where are the real and imaginary numbers actually stored and how can I access them?
댓글 수: 0
답변 (2개)
Azzi Abdelmalek
2016년 3월 27일
%----Example-----
h=tf(1,1:2)
%------------------
[re,im,freq]=nyquist(h)
re=squeeze(re)
im=squeeze(im)
plot(re,im)
댓글 수: 0
Ced
2016년 3월 27일
Hi
The values in RE and IM are, as you correctly assume, the real and imaginary values (of the vector w, which would be the 3rd output). The Nyquist function is able to handle MIMO systems. For this reason, the actual values RE and IM are stored in the third dimension.
I.e. if you have a 1x1 system, your output will be a 1x1xNw "matrix", where Nw is the number of frequency points. If you have a 2x1 system, the output is a 2x1xNw matrix, etc.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!