plot all roots of a polynomial which has a interval coefficient
조회 수: 2 (최근 30일)
이전 댓글 표시
For example, if the polynomial is: p= s^3 + a*s^2 + s + 1 which a=[2,3].
How can plot all the roots of this polynpomial? I can only figure out the roots when 'a' is fixed.
댓글 수: 2
Rik
2021년 3월 24일
Wouldn't that just mean you would have to find the roots in a loop? There is an analytical way to determine the roots, but that will be a pain to implement.
채택된 답변
Rik
2021년 3월 24일
I meant something like this.
N=200;
Z=NaN(N,3);
a=linspace(2,3,N);
for n=1:numel(a)
p=[1 a(n) 1 1];
z=roots(p);
Z(n,1:numel(z))=z;
end
h=plot(real(Z),imag(Z));
legend({'1','2','3'},'Location','NorthWest')
[h.Color]=deal('b','r','k');
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Polynomials에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!