w (niby omega) = 1:10:100;
z=10 + w*0.1j;
y=1/z;
scale ([, , , ]);
plot(real(y), imag(y)
I nic nie jest wyswietlane na grafie. Dlaczego tak sie dzieje.
Jezeli sie wyswietli np:
y
czy
z to wszystko jest OK. Ale na grafie nic nie ma. Chodzi o admitancje.
Impedancja odwzorowana jest korrekt.
Czy to jest problem programu czy moj?
I'll try to answer in English to the part of your post I've understood, the code fragment...
> w (niby omega) = 1:10:100;
> z=10 + w*0.1j;
> y=1/z;
> scale ([, , , ]);
> plot(real(y), imag(y)
Assuming "(niby omega)" is a comment, one gets the following errors:
w = 1:10:100;
z=10 + w*0.1j;
y=1/z;
scale ([, , , ]);
plot(real(y), imag(y)
Incomplete expression (5)
At line 5 ("plot..."), there is a missing closing parenthesis.
w = 1:10:100;
z=10 + w*0.1j;
y=1/z;
scale ([, , , ]);
plot(real(y), imag(y))
Incompatible size (3) '/'
At line 3, operator / has a scalar left operand and a row vector of length 10 as its right operand. A / B is equivalent to A*inv(B) where inv(B) is the matrix inverse of B. Element-wise division is performed with operator "./".
w = 1:10:100;
z=10 + w*0.1j;
y=1./z;
scale ([, , , ]);
plot(real(y), imag(y))
Bad argument (4) 'scale'
Function scale doesn't accept an empty array as argument.
w = 1:10:100;
z=10 + w*0.1j;
y=1./z;
plot(real(y), imag(y))
That works!
If you want a smoother Nyquist diagram, you can use the nyquist function which selects automatically the frequencies where the transfer function is evaluated:
clf % clear the figure
num = 1;
den = [0.1, 10]; % 0.1 s + 10
scale('equal', [-0.1, 0.2, -0.2, 0.2]);
nyquist(num, den);
Hope this helps,
Yves