Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


Math Forum » Discussions » Software » comp.soft-sys.matlab

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

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   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
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

> 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.
Use a real-valued function instead.

Best wishes
Torsten.



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.