Getting Real & Imaginary Numbers From Nyquist(Sys)
18 次查看(过去 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!