How to define line colour in zplane plotting
古いコメントを表示
I have used the command; zplane to plot a graph and i wanted to change the line colour but still i am struggling...... if someone know how to do this please let me know!!!
Thank you, Ishan
採用された回答
その他の回答 (4 件)
Walter Roberson
2011 年 4 月 6 日
[hz,hp,ht] = zplane(...);
set(findobj(ht, 'Type', 'line'), 'Color', NewColor);
2 件のコメント
Babarandage Perera
2011 年 4 月 21 日
Walter Roberson
2011 年 4 月 21 日
編集済み: Walter Roberson
2020 年 9 月 16 日
figure(2) % Z-plane poles and zeors
[hz1, hp1, ht1] = zplane(a,b); % Plot zeros and poles when coefficients are unquantized
grid on;% turn on grids
hold on;% Plot the second graph in same figure
[hz2, hp2, ht2] = zplane(H_Ka,H_Kb);%Plot zeros and poles when coefficients unquantized
hold off;
set(findobj(ht1, 'Type', 'line'), 'Color', 'r'));
set(findobj(ht2, 'Type', 'line'), 'Color', 'g'));
Matt Fig
2011 年 4 月 21 日
0 投票
Andrei Prikhod'ko
2016 年 10 月 22 日
0 投票
Walter forever!!!
Hansamal Dharmananda
2020 年 9 月 16 日
clc; clear;close all;
%%
%%%%%%%% a) b) %%%%%%%%%
B=[1 2 -1]; %numerator coeffients
A=[1 -1 0.5]; %denominator coeffients
Zeros=roots(B); %numerator
Poles=roots(A); %denominator
[hz1, hp1, ht1] = zplane(B,A);%with the unit circle
set(findobj(hz1, 'Type', 'line'), 'Color', 'b');
set(findobj(hp1, 'Type', 'line'), 'Color', 'g');
set(findobj(ht1, 'Type', 'line'), 'Color', 'r');
% H = tf(B,A); %set the transferfunction
% pzmap(H) % without the unit circle
title('Pole-zero map')
axis([-3 1.2 -1.2 1.2]);
カテゴリ
ヘルプ センター および File Exchange で Annotations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!