From help-request at octave dot org Fri Feb 18 04:25:28 2005 Subject: using quad to integral on a circle, From: Afsshl at aol dot com To: help at octave dot org Date: Fri, 18 Feb 2005 05:30:25 EST --part1_1c4.234913a1.2f471dc1_boundary Content-Type: multipart/alternative; boundary="1c4.234913a1_alt_bound" --1c4.234913a1_alt_bound Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Dear matlab/octave user: I like to evalute an integral on a circle which will become so I tried to program the following matlab/octave code, but it is proved not work ------------------------------------------------------------------------------ ---------------------------------- octave:1> function z=f2(x) > z = x^2; > endfunction; octave:2> function z=f(x) > z=9*quad( at f2, -sqrt(9-x^2), sqrt(9-x^2))-3*x; > endfunction; octave:3> quad( at f, -3, 3) error: quad: invalid recursive call error: evaluating binary operator `*' near line 2, column 10 error: evaluating binary operator `-' near line 2, column 47 error: evaluating assignment expression near line 2, column 8 error: called from `f' error: quad: evaluation of user-supplied function failed octave:3> ------------------------------------------------------------------------------ ------------------------------ please help eric --1c4.234913a1_alt_bound Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable
Dear matlab/octave user:
 
I like to evalute an integral on a circle
 
 
 
 
whic= h will become
 
 

 

 

 

 

so= I tried to program the following matlab/octave code, but it is proved not w= ork

--= ----------------------------------------------------------------------------= ----------------------------------

 

 

oc= tave:1> function z=3Df2(x)
>      &nb= sp;    z =3D x^2;
>      =   endfunction;
octave:2> function z=3Df(x)
>  &nb= sp;    z=3D9*quad( at f2, -sqrt(9-x^2), sqrt(9-x^2))-3*x;
>= ;        endfunction;
octave:3> qua= d( at f, -3, 3)
error: quad: invalid recursive call
error: evaluating bin= ary operator `*' near line 2, column 10
error: evaluating binary operator= `-' near line 2, column 47
error: evaluating assignment expression near=20= line 2, column 8
error: called from `f'
error: quad: evaluation of use= r-supplied function failed
octave:3>

 

 

 

 

 

 

-----------------------------------------------------------------------= -------------------------------------

please help

eric

--1c4.234913a1_alt_bound-- --part1_1c4.234913a1.2f471dc1_boundary Content-ID: Content-Type: image/gif; name="clip_image002.gif" Content-Disposition: inline Content-Transfer-Encoding: base64 R0lGODlhBAEoAHcAMSH+GlNvZnR3YXJlOiBNaWNyb3NvZnQgT2ZmaWNlACH5BAEAAAAALAIA AgABASMAgAAAAAAAAAL/hI8ZG8adopy02ouz3rz7D4bOAzyQiKbqyrYV43oLMsd2Bt/6ke80 2arhTiWiTwJ89ZDJY7DpmwlDJihlOnUqrNvltqh1SY3hMvNnnmTV5LT77e55Qc15ZH3HP9s8 vcZulgSoVDXIdGLIIefXN8Q38ogxmOh4xbiyRJkHVhTZBcH1kUN5+SVTaqFZ+Ye64aUKOdra WYiJ6EnrGSo5y/bk2st7xiqI21djZdIZWwgqRMIFjdcMaEetPCeN3bz8s2YNU3tdBXmh3K0o mzkGxE6OHpvKPoysl+0+zvbsPlJu2mVpX4N2744RQrdLnzMp/gyG22fQm7kx8hp9OodwW6h1 /wNvRURzrODHZRAxNsyz0JuxkPFSSqznEp7MQ5x8WaSJsqO2algo1pQJ7hFHTjCzLLrlrCYs WsxuNnqINOZJhZF6CvVDLRcfjvUAgkQZUGVSrV7p+ZxJaCERqNdUnqxF1VK/jd/U7pxGbls/ eDy35pXGrNhVrfOAcQtp1+S6cgl3vZtUd5xIkup0LiqLmXFlwmqd5mzb4aiNpTTgyFtZ4vQ/ FaglBhJ4A5ZJ0zjjhiWLYjav1ixEx26VkPZUt7dzsSaN1klP4cybOze9/Ln06dRtseVdPbv2 6QSDbf8OPrz48eTLmz+PXocm5Onbuyee9r189+tXep+Pv/lZucLy+ywXv19gl3GG3X8GvvaT ZyB1dGCD3+UTGWAOTqidZPwFR2GGr0Xol3EafkhbAQA7 --part1_1c4.234913a1.2f471dc1_boundary Content-ID: Content-Type: image/gif; name="clip_image002.gif" Content-Disposition: inline Content-Transfer-Encoding: base64 R0lGODlhvwA5AHcAMSH+GlNvZnR3YXJlOiBNaWNyb3NvZnQgT2ZmaWNlACH5BAEAAAAALAIA BAC6ADMAgAAAAAAAAAL/hI+Zwe0PlZy02ouz3rzT4IXiSJbmuWgNyrbuK4LqCtf2nTmXTFcM DgwKHxbQ7+eTCZdMF9IHOCoPkGfziu30FryocWr4ZsdkzjYcRVd11rKbRAxHzGBqmlr3tt/8 zepfNbOHgKTDddaXuMMjhfeSpxjJsme1BimJyXTWsyZhSDeYKaqwOcVG+SkYOsrqRVrX+Bpz qYXYWoMKNsc1ixJ3a1OohOrqSVt07LEKbBIod6gHm/yRR5OaVGurl7QcHby7ZY2ovagrvI2c jf5K2/3MvA5KKMzYPi0bD22cTI55nRNuGD1q/dJh21cO3j8MnzgNPOUuYTRxpjpBtDRqYTmB +xy/dDxB5JyceugMARJ3aBcWjcieBPxVcKRKPBXneRyJs6TLeyl/PYq5jyNCmi0cQkOZE2mx opaadqLJ06ZQdjadMKI6MCnJpT1ZBvFKcCpUqUAZxtopJmQgZxHLgJ2QCm1Fj1GDSolbb61T n5neBq0qqSw8s3WJAk4keLBEdfr4JO77+LFhxYoB+SnsiHLlrGZ7aR58inBbsp83+/XLDnPp N6hXuw4x0+peZ6/JcAYYUXVt27dFH4sqebfsm7V2XB4tHEZswsbzGUvOTO9vV92QQ/fX7lku vtdvgb1KiWv3zxjvOBU/XniXzCnTd5ebWrf7jPLn765vP1IBADs= --part1_1c4.234913a1.2f471dc1_boundary-- ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------