Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: use quadl and give me this error=??? Undefined function or method 'isfinite
Replies: 2   Last Post: Jan 28, 2013 2:32 AM

 Messages: [ Previous | Next ]
 Torsten Hennig Posts: 2,419 Registered: 12/6/04
Re: use quadl and give me this error=??? Undefined function or method 'isfinite
Posted: Jan 28, 2013 2:32 AM

> i m new to matlab and i want plot these equation
>
> unfortunately when i write following code it give me
> error
>
> ??? Undefined function or method 'isfinite' for input
> arguments of type 'sym'.
>
> Error in ==> quadl at 74
> if ~isfinite(y(1))
>
> Error in ==> test10 at 84
> ss=quadl(f , 1 , 2);
> i need to run this code successfully in 1 day please
> if you know anything that can help me let me know
>
> here is my code and thank you in advance
>
> close all
> clear
> clc
> re=0.5;
> t=0:1:10;
> syms k r n z
> s=k*r;
> m=k*re;
> eps=70/9600;
>
>
> %*************************************
> %for n=0
> %*************************************
> pin0= besseli(1,k*r);
> pin01=besselk(1,k);
> pin04=pin0*pin01;
> pin02=((1-eps)*besseli(0,k)*besselk(0,k)*diff(besselk(
> 0,k)));
> pin03=1/(eps*diff(besselk(0,k))*besseli(0,k)-besselk(0
> ,k)*diff(besseli(0,k)));
> pin07=pin03*pin02;
> pin08=pin04*pin07;
> %ezplot(pin08);
> %*************************************
> %for n=1
> %*************************************
> pin1= besseli(1,k*r);
> pin11=besselk(1,k);
> pin14=pin1*pin11;
> pin12=((1-eps)*besseli(1,k)*besselk(1,k)*diff(besselk(
> 1,k)));
> pin13=1/(eps*diff(besselk(1,k))*besseli(1,k)-besselk(1
> ,k)*diff(besseli(1,k)));
> pin17=pin13*pin12;
> pin18=2*pin14*pin17;
> pin19=cos(t);
> pin10=pin18*pin19;
> %ezplot(pin10);
>
> %*************************************
> %for n=2
> %*************************************
>
> pin2= besseli(2,k*r);
> pin21=besselk(2,k);
> pin24=pin2*pin21;
> pin22=((1-eps)*besseli(2,k)*besselk(2,k)*diff(besselk(
> 2,k)));
> pin23=1/(eps*diff(besselk(2,k))*besseli(2,k)-besselk(2
> ,k)*diff(besseli(2,k)));
> pin27=pin23*pin22;
> pin28=2*pin24*pin27;
> % pin9=cos(t);
> % pin10=pin8*pin9;
> %ezplot(pin27);
>
> %*************************************
> %for n=3
> %*************************************
> pin3= besseli(3,k*r);
> pin31=besselk(3,k);
> pin34=pin3*pin31;
> pin32=((1-eps)*besseli(3,k)*besselk(3,k)*diff(besselk(
> 3,k)));
> pin33=1/(eps*diff(besselk(3,k))*besseli(3,k)-besselk(3
> ,k)*diff(besseli(3,k)));
> pin37=pin33*pin32;
> pin38=2*pin34*pin37;
> % pin9=cos(t);
> % pin10=pin8*pin9;
> %ezplot(pin37);
> %*************************************
> %for n=4
> %*************************************
>
> pin4= besseli(4,k*r);
> pin41=besselk(4,k);
> pin44=pin4*pin41;
> pin42=((1-eps)*besseli(4,m)*besselk(4,k)*diff(besselk(
> 4,k)));
> pin43=1/(eps*diff(besselk(4,k))*besseli(4,k)-besselk(4
> ,k)*diff(besseli(4,k)));
> pin47=pin43*pin42;
> pin48=2*pin44*pin47;
> %pin9=cos(t);
> %pin10=pin8*pin9;
> %ezplot(pin47);
>
>
> sigma=pin48*cos(4*t)+pin38*cos(3*t)+pin28*cos(2*t)+pi
> n18*cos(t)+pin08;
>
> f = @(k , r )sigma;
> ss=quadl(f , 1 , 2);
>
>
> --------------------------------------

quadl does not accept symbolic input.