use of polyxpoly to find roots

조회 수: 2 (최근 30일)
vipul kumar
vipul kumar 2020년 4월 23일
편집: Pravin Jagtap 2020년 4월 28일
I have used this code to find the roots but it is giving an error.
clc
clf
b=linspace(0,1);
x=8;
p= x.*(sqrt(1-b)).*(((besselj(1,x.*sqrt(1-b)))./(besselj(0,x.*sqrt(1-b)))));
q = x.*(sqrt(b)).*((besselk(1,x.*sqrt(b)))./(besselk(0,x.*sqrt(b))));
plot(b,p)
hold on
plot(b,q)
[xx,yy] = polyxpoly(b,p,b,q)

답변 (1개)

Pravin Jagtap
Pravin Jagtap 2020년 4월 27일
편집: Pravin Jagtap 2020년 4월 28일
Hello Vipul,
Refer to the following documentation for understanding how 'ployxpoly' works:
From your code, I can see that the first value of 'q' vector is 'NaN' (Not a Number) which is not acceptable. Please check how you can handle that corner case.
Hope this will help you.

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by