mm-393 Subject: Re: orthogonal polynomial>> Is there a relationsp known for the dice between the largest root>> of an orthogonal polynomial and the endpoint of the orthogonality>> interval? I would like to know how fast ts dice shrinks as a>> function of the degree of the polynomial... > non-classical orthogonal polynomials at hand. I have the orthogonality> interval and the weight function, but not a closed form of the polynomials.> Is there some general theory? I've just ordered Szeg.9a's book Orthogonal> Polynomials. I hope to find sometng in there.... ===It's difficult to obtain good estimations in general case, i.e. foran arbitrary weight (positive) function.where you find an interesting paper by Ilia KRASIKOV, namely,,On extreme zeros of classical orthogonal polynomials.Likewise, I remember that 30-35 years ago, Geza FREUD was interested to give ,,good bounds for the extreme zeros.(I appreciate that NEVAI has many informations regarding such problems).====== Subject: Re: Data fitting problem with chebyshev polynomials> I want to fit some pure complex data x (only imaginary part) to some other> complex data, y, by a polynomial with linear least squares.y=p0 T0(x) +p1 T1(x)+...+pn Tn(x)> where Ti(x) represents the i'th Chebyshev polynomial.> (i thought ts would provide me with better numerical conditioning,> since i get Vandermonde system to solve).> Does anyone know what i'm doing wrong, or does ts technique only work> for real data??>Arnold Neumaier[Chebyshev is good only if the arguments are in theinterval [-1,1]; the function values may be arbitrary....]=======Denote (z)_0:=1 , (z)_k=z(z+1)...(z+k-1) for k=1,2,...,F_{2,1}(a_1,a_2;b_1;z)= SUM_{k=0 to k=infty}( (a_1)_k (a_2)_k/(b_1)_k)z^k/k!F_{p,q}(a_1,a_2,...,a_p;b_1,b_2,...,b_q; z)==SUM_{k=0 to k=infty}( (a_1)_k (a_2)_k...(a_p)_k /((b_1)_k...(b_q)_k )) z^k/k!Note that when a_1= -n , n=0,1,..., the aboveF_{p,q}(-n,...;b_1,...;z) is a finite sum.Further, for a>-1 , b>-1 J_n(a,b;x)= F_{2,1}(-n,n+a+b+1;a+1;(1-x)/2)= Jacobi polynomial ofdegree n .There are ,,many Chebychev polynomials . More exactly[1.] (CONTINUOUS CASE) T_n(x) = J_n(-1/2,-1/2;x) = cos(n*arccos x) , (when |x|=< 1), =first kind U_n(x)= J_n(1/2,1/2;x)= sin((n+1)*arccos x)/((n+1)*sqrt(1-x^2)) , =second kind J_n(1/2,-1/2;x)= (T_n(x)-T_{n+1}(x))/((2n+1)*(1-x))= trd kind========================================================== ====================[2.] (DISCRETE CASE) Let N be a positive integer and for n=0,1,...,, n =< N-1,denote ======================================================= (1) t_n(x)= (-1)^k (N-k)_k F_{3,2}(-n,n+1,-x; 1,1-N ; 1) ======================================================= (Chebychev polynomials of discrete variable, P.L.Chebychev-[1875] ,,Sur l'interpolation des valeure equidites , Oeuvres , tomII, Chelsea,New York,1961 ,pp.219-241 ) Suppose that f,g:[0,N-1]--->R and define scalar product (#) (f,g)= SUM_{k=0 to k=N-1} f(k)*g(k) , ||f|| = Sqrt((f,f)) .If you have the table x| 0 1 ... N-1--------------------- y|f(0) f(1) ... f(N-1) and you try to find the polynomial T(x) , of degree m , (m < N-1) ,such that(2) || f- T|| =< ||f-h ||for all polynomials h of degree =< m , then the solution is ===========================================(3) T(x)=SUM_{k=0 to k=m}w_k*(f,t_k)* t_k(x) ============================================where w_k=1/(t_k,t_k)=(2k+1)*(N-k-1)!/( k!*(k+1)_N ).Observe that (2) is the same with (f-T,f-T)=< (f-h,f-h) and (t_k,t_j)= 0 for 0=< j=/=k < N .In the complex, case when f,g: [0,N-1]---> C , try to change thescalarproduct, more exactly instead of (#) consider instead ---- (#') (f,g)= SUM_{k=0 to k=N-1} f(k)*g(k) , ||f|| = Sqrt((f,f)) . -----where g(k) means the conjugate of g(k) . Other informations you find in :[1] A.F. NIKIFOROV , S.K. SUSLOV , V.B. UVAROV , ,, Classical Polynomials of a Discrete Variable , Springer Series in Computational Physics , Springer-Verlag ,1991.Perhaps help, ============================Subject: Can ts be solved?Can ts equation be solved?y=a+b*exp(- c * x)At x=L, y=0 and x=M, y=Alpha (where 1> Alpha>0) x=H, y=1where H>M>L>0My objective is to find a, b, cAny reference would be appreciated? Online link is fine too?===Subject: Re: Can ts be solved? >Can ts equation be solved?y=a+b*exp(- c * x)At x=L, y=0 and > x=M, y=Alpha (where 1> Alpha>0) > x=H, y=1 >where H>M>L>0My objective is to find a, b, cAny reference would be appreciated? Online link is fine too?homework? three equations in three unknowns, well , nonlinear insert x=L, get a dependent on b and c, insert x=M , expressing now b as a function of c insert x=H 1/Alpha = (exp(-c*H)-exp(-c*L))/(exp(-c*M)-exp(-c*L)) solve for c numerically: http://www.netlib.org/fmm/fzero.f c>0 very small gives on the right hand side approximately (H-L)/(M-L) > 1 and c to infinity gives 1 on the right hand side. so at least for (H-L)/(M-L) > 1/Alpha there is a solution ===Subject: Re: Too many iterations in tqli.c> I agree with you that there does not seem to be any perfect solutions> for matrix computations in C++ in the same way that LAPACK exists for> FORTRAN (and C). I have developed my own class library whose primary> goal is to interface to the core functionality of LAPACK/ATLAS/Intel> MKL wle ding the details of interfacing with these libraries. If> you're interested in seeing what I've got, I'm willing to sht are.RyanSure I'm interested. I can contribute too. Also, I've found it++> blas and lapack, and the syntax resembles matlab, wch is good, > but it still implements its own vector class, so you can only > multiply a matrix by their own vector. With a little hacking, it > can be what I need.these libraries having their own vector class. It's been my feelingthat the STL vector in C++ is not really the kind of vector class onewould use in linear algebra. Additionally, with all the functionalityone would want from a fully functional vector (from the linear algebrapoint-of-view), it seems reasonable to me to have a separate class. In my implementation, though, I do use std::vector as a private memberto store the data.===Subject: Re: Too many iterations in tqli.c > these libraries having their own vector class. It's been my feeling> that the STL vector in C++ is not really the kind of vector class one> would use in linear algebra. Additionally, with all the functionality> one would want from a fully functional vector (from the linear algebra> point-of-view), it seems reasonable to me to have a separate class. > In my implementation, though, I do use std::vector as a private member> to store the data.STL's vector and valarray already have with the +/-, *, etc implementedalready, and there are also componentwise operators that can beapplied to a container, that already come with STL. I don'tsee any point in re-inventing the wheel, if STL provides all thebasic operations needed for a vector.===Subject: Wch finite elements would you recommend for ts problem?I have a flow field, wch has been found using the Galerkin finiteelement method to solve the Stokes flow equation for u1, u2 and p.The velocity has been approximated using 'Crouzeix-Raviart' elements(as continuous linear elements don't work so well for ts problem.).These elements are piecewise linear, triangular elements wch aredefined by the values of the approximated function at the midpoint ofthe triangle edges. They are therefore discontinuous in general. Thepressure has been approximated by piecewise cont elements. Thecode to find the flow is simple and works quite well.Now I need to solve a dard linear advection-diffusion equation(with inhomogeneous diffusivity) for a solute concentration c. Thevelocity field for the solute transport is that given by the flowcalculation described above.What finite elements would you suggest using for the concentrationfield? Should these elements also be of the 'Crouzeix-Raviart' formdescribed above or sometng else.I'm concerned in particlular about finding a consistent form of theterm div(c*[u1,u2]) of the advection-diffusion equation in theGalerkin problem.Any thoughts would be very welcome. Yours,===Subject: Re: Wch finite elements would you recommend for ts problem?> What finite elements would you suggest using for the concentration> field? Should these elements also be of the 'Crouzeix-Raviart' form> described above or sometng else.I'm concerned in particlular about finding a consistent form of the> term div(c*[u1,u2]) of the advection-diffusion equation in the> Galerkin problem.For linear advection-diffusion equation, an Eulerian-Lagrangiantype of Galerkin method should be suitable. These will rathereasily incorporate your Crouzeix-Raviart velocity field analytically,and the diffusion can be handled implicitly, giving you asymmetrical, positive definite matrix to be solved for at eachtimestep. === Subject: Re: Wch finite elements would you recommend for ts problem?> What finite elements would you suggest using for the concentration> field? Should these elements also be of the 'Crouzeix-Raviart' form> described above or sometng else.I'm concerned in particlular about finding a consistent form of the> term div(c*[u1,u2]) of the advection-diffusion equation in the> Galerkin problem.Ts is Stokes flow, so I assume the Re is not too gh. However, theadvection-diffusion equation may require some form of stabilization,e.g. SUPG, for it to work. If in general you expect the concentrationto be a continuous function, then I'd use a continuous basis for it.-===Subject: Programmers Wanted for Computer Grapcs Startup Near PladelpaMy name is Schwartz, and I'm a University of Pennsylvania Ph.D. and an independent inventor. I'm submitting two computer grapcs patents to the USPTO during the next several weeks. Technologies derived from these patents have application in several different et segments, including still image photomanipulation, movie special effects and post-production,web animation, and video games. I'm developing and eting one or more of the applications through a startup company. I've produced demo output that clearly demonstrates the viability of my approaches, wch I've been showing to potential licensees and investors. Ts demo output is currently being generated through a loosely connected series of scripts. To be productized the scripts will need to be recoded into dalone industrial strength applications that are much faster, bullet-proof, and that have slick GUIs. I'm looking for a lead/senior programmer to participate in and organize the implementationside of the startup and probably one or more junior programmers. Successful candidates for the programming team should have some to many of the following skills/characteristics:Extensible knowledge of/comfort with math, as exemplified by one or more of: Computer vision training/experience - feature location/ extraction, motion estimation, object recognition; Image processing training/experience - you know what a convolution kernel is; you've implemented a morpng algorithm; Linear algebra training/experience - matrix manipulation, familiarity with numeric computation packages, such as Matlab, or equivalent; Art/math programming play, mathematical visualization;3D modeling, especially for character animation, especially if you've hacked/manipulated low-level 3D data representations in a variety of formats;GUI design/building, grapc design training a plus;Analysis of algorithms;C/C++, Linux/Unix a plus;Startup and/or major fielded product development experience required for the lead/senior programmer, a plus for juniors;Witn commuting dice of Pladelpa - we may move and/or outsource, but ts is where/how we'll start;Relevant educational background is a plus, but I'm more interested in what you can demonstrate to me that you know, can do, and have done, than what you've formally studied;Intellectual flexibility, creativity, and ability to work and brainstorm collaboratively;Open-ended time commitment - After growing ts, I have additional ideas in the queue that could be spun off into future products; andDemonstrable artistic skills and training in figurative painting, sculpture, and/or life-drawing are a plus.We have access to seed capital, and we'd prefer if participants accept some portion of salary as equity in our venture. If you're interested in participating, send me a cover letter and resume at cgstartup@earthlink.net. I'm willing to show you the demo and provide more details about the technology, although first you'll have to sign a non-disclosure agreement. The demo can also be posted temporarily to the web for online viewing, accompanied by an explanatory phone call. For Investors/Licensees:If you're a potential investor in the startup or a representative of a company that is potentially interested in licensing one of the applications and are interested in seeing the demo and hearing a description of the technologies, also under conditions of non-disclosure, please let me know through the means described above.===Subject: c++ program for nxn matrix by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i0TDrPS15856;good day. can you show me a simple c++ program that can solve(addition,subtraction,multipilication and division) an nxn matrix.much.===Subject: Re: c++ program for nxn matrix> can you show me a simple c++ program that can solve> (addition,subtraction,multipilication and division) an nxn matrix.> simple program that can be easily understood by a student.Take a look atThe C++ Scalar, Vector, Matrix and Tensor class Library http://www.netwood.net/~edwin/svmtl/===Subject: Re: c++ program for nxn matrix> good day. can you show me a simple c++ program that can solve> (addition,subtraction,multipilication and division) an nxn matrix.> much.if you use a lib (e.g. newmat) you are able to work with expressions asfollowsA=B*C.i()+O(where C.i() is the inverse),can be easily understood, I Tnk. If you want to go into more details ofe.g. how inverting a matrix, you should start with a math-book and thantake a look at the sources of newmat or MTL (find these onwww.oonumerics.org). But of course that isnot easy, not at any time atleast and depending on your skills.-- === Subject: 2D FFT source code by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i0TDrQB15895;I want most efficent way of implementing fft on image.===Subject: Re: 2D FFT source code> I want most efficent way of implementing fft on image.Try searcng the newsgroup first! Plenty of suggestions out there,===Subject: Re: 2D FFT source code> I want most efficent way of implementing fft on image.Run 1-D FFT on rows. Call ts output the intermediate matrix. Run 1-D FFT on columns of intermediate matrix. Voila! You're done.OUP===Subject: Re: 2D FFT source code>> I want most efficent way of implementing fft on image.Run 1-D FFT on rows. Call ts output the intermediate matrix. Run 1-D > FFT on columns of intermediate matrix. Voila! You're done.In principle, that row-column method may not be the most efficient way to compute a 2d FFT. There are known algorithms such as vector-radix (a recent variant of wch has been called the dimensionless fft), polynomial transforms ala Nussbaumer, and a recent algorithm by Bernardini, that can require fewer arithmetic operations. Vector-radix may also have cache-related advantages.I point ts out merely for completeness, though...the actual speed is determined mostly by quality of implementation, and I'm not aware of heavily-optimized versions of the above algorithms, wle many efficient 1d FFTs are readily available.In practice, you are probably best off just using a canned FFT routine that performs multidimensional transforms, and for an image you will www.fftw.org that might serve.===Subject: Re: function interpolation by using normal distributions>>is there an algorithm wch permits to abtain a function interpolation>>by using a set of normal distributions?>>M> do you mean > sum {i=1,...,n} a_i*exp(-(x-m(i))^2/s(i)^2) > ?> with the m(i) and s(i) given ts amounts to a linear system of equations> and is a special case of interpolation by radial functions. ts is known > also for several independent variables and often used in scattered data > interpolation. be warned that the linear systems can be quite illconditioned. > if m(i) and s(i) are unknown, ts becomes a nasty nonlinear problem and > then problems with n>=4 already pose severe problems. even worse if you are> in hger dimensions and have are more general model involving covariance> matrices.Ts sounds like radial basis function neural network for regression,assuming the covariance matrices are multiple of identity matrix.You may as well take a look at support vector regression withradial basis function kernel, wch does similar tngs asrbf neural network, but with the problem formulated differently. ===Subject: FElt for teacng finite elementsI am going to teach an introductory course of finite elements. I wantto present simple examples of 1D and 2D problems, using non-structuredtriangular meshes, for scalar and vector equations. The students willhave practical classes on computers with linux. I have been usingMODULEF for ts purpose but I noticed it is too heavy for a studentto learn the MODULEF syntax and tricks. I wonder if using the FEltsoftware would be more appropriate. Has anybody used FElt recently ? Is it a good choice for teacng finite elements ? Do you recommendanother software instead ? (free software only). Cristian Barbarosie http://cmaf.ptmat.fc.ul.pt/~barbaros===Subject: calculating a formula from numbersI'm looking for a tool what can help me with calculating a formulafrom numbers.I want to feed ts tool 5000 numbers (15 digits) as 'questions' and5000 numbers (8 digits) as 'answers'. Ts tool should be able toderive one formula.Im not sure if 5000 numbers is enough. Can someone give me some adviceon ts matter.Andy===Subject: Re: calculating a formula from numbers> I'm looking for a tool what can help me with calculating a formula> from numbers.> I want to feed ts tool 5000 numbers (15 digits) as 'questions' and> 5000 numbers (8 digits) as 'answers'. Ts tool should be able to> derive one formula.> Im not sure if 5000 numbers is enough. Can someone give me some advice> on ts matter.> AndyYou did not specify what you want from the formula (choose one or moreoptions):* to retrieve answers only to already asked questions, in some time-savingmanner?* to estimate (predict) answers to nearby questions wch may not havebeen asked yet?* to predict answers to questions away from the range of already askedquestions?* to respect the values of questions and answers as precise numbers, toall digits?* to respect bounds resulting from rounding? Explanation: The statement x=2.447 to 4 digits represents an inequality 2.4465 <= x <= 2.4475.* should the formula be polynomial (a popular, albeit not always suitable,form)? Or from another class of formulas (rational, exponential, ...)Ts may be a key to success: for example, approximating periodic data bypolynomials is silly, but approximating them with trigonometric functionsis wiser.* should the formula represent a trade-off between brevity anddeliberately allowed extra errors? (Least squares come to mind).Consult the web (Google or another search program) under key expressionscurve fitting, data compression, approximation of data, andthe like.A true but possibly useless answer to the original inquiry: Yes, apolynomial formula exists (if the data are functional -- every questionhas exactly one answer), and it can have degree up to 4999, depending onyour data. The process is called polynomial interpolation.===Subject: dealing with noisy data by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i0UE5OX08639;,iam doing my project in the area of Reverse Engineering.wle thelaser is scanning the part its giving some noisy data because of theinternal reflection between surfaces.iam applying gaussian distribution to the data.i don't know how toproceed.is it possible tp apply gaussian distribution to discrete values.the suggestios in ts regard is ghly helpful.,=== Subject: RungeKuttta by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i0UF7te14072;I'm using a runge-kutta 4th order to simulate a vecle moving in acircle. I create an acceleration vector that is ALWAYS perpendicularto the velocity vector. However, I noticted that the velocity vectorof my vecle is slowly getting bigger. Why is the velocity vectorgetting bigger if the acceleration that I'm giving to rk4 is alwaysorthogonal with the velocity? Anybody know if there is a betterintegrator to use for ts problem?Eric===Subject: Re: RungeKuttta> I'm using a runge-kutta 4th order to simulate a vecle moving in a> circle. I create an acceleration vector that is ALWAYS perpendicular> to the velocity vector. However, I noticted that the velocity vector> of my vecle is slowly getting bigger. Why is the velocity vector> getting bigger if the acceleration that I'm giving to rk4 is always> orthogonal with the velocity? Anybody know if there is a better> integrator to use for ts problem?Eric> You're probably using an explicit RK4.Explicit RK schemes do not conserve energy.That is probably the reason for your troubles.You should try a symplectic implicit RK.You can also improve an explicit RK byperforming, if possible, an analyticintegration of the linear part of the equations.BTW, are you using a cont step RK$or an automatic selection of time step ?The second case is MORE efficient for longtime simulations.You'll find all the informations you need in:Ernst Hairer, Syvert Nrsett, Gerhard WannerSolving Ordinary Differential Equations I. Nonstiff Problems.Springer Series in Comput. Mathematics, Vol. 8, Springer-Verlag 1987, Second revised edition 1993.Ernst Hairer, Gerhard Wanner.Solving Ordinary Differential Equations II. Stiff and Differential-Algebraic Problems.Springer Series in Comput. Mathematics, Vol. 14, Springer-Verlag 1991, Second revised edition 1996.Ernst Hairer, Christian Lubich, Gerhard WannerGeometric Numerical Integration. Structure-Preserving Algorithms for Ordinary Differential Equations.Springer Series in Comput. Mathematics, Vol. 31, Springer-Verlag 2002.Have a nice time reading,D.===Subject: Re: RungeKuttta> I'm using a runge-kutta 4th order to simulate a vecle moving in a> circle. I create an acceleration vector that is ALWAYS perpendicular> to the velocity vector. However, I noticted that the velocity vector> of my vecle is slowly getting bigger. Why is the velocity vector> getting bigger if the acceleration that I'm giving to rk4 is always> orthogonal with the velocity? Anybody know if there is a better> integrator to use for ts problem?Eric> You're probably using an explicit RK4.> Explicit RK schemes do not conserve energy.> That is probably the reason for your troubles.You should try a symplectic implicit RK.Simplectic methods do not necessarilyconserve energy. Neither condition impliesthe other.===Subject: Re: Numerical quadratures for irregular gridsI am looking for the algorithms of numerically evaluating> integrals of functions of one (x) and two (x,y) variables, at the> assumption that the function values are available exclusively as a> collection of discrete values, and that the grids of x or (x,y) points> at wch the function values are given are generally irregular> (please note that dard textbooks discuss almost exclusively the case> of regular grids, with cont grid spacings).> I am interested not only in the theory of various approximations> to the integrals in such cases, but also in practical algorithms> of navigating through the sets of discrete function data.The Fortran 90 code INTEGRAL_TEST by Burkardt, available athttp://www.csit.fsu.edu/~burkardt/f_src/integral_test/ integral_test.html, may be applicable (I have not used it). Quoting the site, Eachintegral is to be approximated simply by averaging the integrandvalues at each point in the dataset, and multiplying by the volume ofthe integration region. (In a few cases, where the integral is notover the unit hypercube, the dataset points are suitably adjusted).===Subject: real analysis by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i0UMJF720606;A polynomial P of degree n (n> k)has the property that P(c)=...=P(k)(c)=0, where P(j)(c) is the jth derivative of P at c.Show that P(c)=(x-c)(k+1)Q(x){(x-c)(k+1)represents (x-c)to the power (k+1)}whereQ(x) is a polynomial of degree n-k-1.===Subject: Looking for an area in Mathematics by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i0UMuvD23728;I want to know if there is a particular area of mathematics thatstudies the nature of equations of state in mathematical models as themagnitude of variables change.Specifically, ways of producing and characterizing as families (orsometng) the symbolic form of approximating functions.E.G. consider:Z=(1-w^2*(C1+C2)*L)/((1-w^2*C2*L)*(i*w*C1+G))As L or w gets small, Z kinda = 1/(i*w*C1+G), though in one conditionit is a beeter approximation than the other.As C2 gets small, Z kinda = (1-w^2*C1*L)/(i*w*C1+G)If there were less brute force yet more powerful/general ways ofcomming up with simple symbolic approximations to formulae, I wouldlike to know about it. I am hoping to find powerful theorems and toleverage insights from great Mathematical minds.Is there a field or sub-feild I should investigate to find informationalong these lines. ===Subject: pairing/partitioning algorithmi'm working on a problem where you have a class of N students who haveM projects. on each project the students will work in pairs.. and ifthere is an odd number of students then there will be one threesome. Students should never work with the same person twice (even if one ofthose times was a threesome).I am stuck coming up with an algorith to determine all of the possiblegroupings for any number N. If N is even then the problem is trivialbut if N is odd.. it seems quite difficult to me. When N=5, M canonly be one, when N=7, max M = 3. when N=11, max M = 6.Any help???===Subject: Intel Fortran for Windows: student edition $29>Wle browsing Programmer's Paradise, I saw that a student edition of>Intel Visual Fortran for Windows 8.0 is available for $29. The link is>http://www.programmersparadise.com/Product.pasp?txtCatalog= Paradise&txtCategory=&txtProductID=I23+0D03> Ts product should give Matlab a run for its money, and> run your problems in seconds instead of days!===Subject: Re: Intel Fortran for Windows: student edition $29Has anyone tried Visual Fortran? What is it like - anytng like Delp,uilder, etc?>Wle browsing Programmer's Paradise, I saw that a student edition of>Intel Visual Fortran for Windows 8.0 is available for $29. The link is>http://www.programmersparadise.com/Product.pasp?txtCatalog= Paradise&txtCate > Ts product should give Matlab a run for its money, and> run your problems in seconds instead of days!===Subject: Re: Intel Fortran for Windows: student edition $29>Wle browsing Programmer's Paradise, I saw that a student edition of>Intel Visual Fortran for Windows 8.0 is available for $29. The link is> >http://www.programmersparadise.com/Product.pasp?txtCatalog= Paradise&txtCategory=&txtProductID=I23+0D03> Ts product should give Matlab a run for its money, and> run your problems in seconds instead of days!You mean people actually *pay* for FORTRAN compilers???===Subject: Re: Intel Fortran for Windows: student edition $29Wle browsing Programmer's Paradise, I saw that a student edition ofIntel Visual Fortran for Windows 8.0 is available for $29. The link is> >http://www.programmersparadise.com/Product.pasp?txtCatalog= Paradise&txtCategory=&txtProductID=I23+0D03 Ts product should give Matlab a run for its money, and run your problems in seconds instead of days!You mean people actually *pay* for FORTRAN compilers???Yes, they do, for at least two reasons. (1) Most commercial Fortran compilers run Fortran 77 codes faster thang77 -- see the Fortran 77 Execution Time Benchs atwww.polyhedron.co.uk. For certains codes, the difference can bedramatic -- a factor of more than 3.(2) G77 is a Fortran 77 compiler. Fortran has advanced past Fortran77, the latest dard being Fortran 95, wch offers many newfeatures, such as structures, array operations and modules (wchallow for automatic procedure interface checking). F77 is retained asa subset in F95. One site discussing the differences between Fortran77 and 90 is http://www.nsc.liu.se/~boein/f77to90/f77to90.html .===Subject: Re: Nonlinear curve fit for saturation data> I need an automated method to fit a curve of the form y => c*x*(1+a*e^(b*x)) to test data.> Voc(PU) Igf(A)> 0.196 5.00> 0.304 7.85> 0.399 10.43> 0.616 16.20> 0.797 21.54> 0.906 25.89> 0.942 29.01> 1.014 32.75> 1.051 37.25> 1.105 44.80> 1.196 61.18> 1.304 105.61Ts is approximately fit with:a = 0.000232> b = 7.005> c = 25.74Fitting to lowest sum of squared relative error, I get:a = 2.45216969e-004b = 6.96242410e+000c = 2.56948865e+001wch seemed to me the best result of the fittingtargets I tried. Fitting to lowest sum of squaredabsolute error, I get:a = 0.02081207b = 4.03580003c = 15.44149065wch is rather a bit different. I'm adding ts equationto my curve fitting site now. James Pllips http://zunzun.com===Subject: 2-D convolution using FFTW3, I want to do a 2-D real discrete convolution using FFTW3, but theresult is wrong compared with the directly convolution. Can anybody tell me the reason and the proper solution using FFTW3?===Subject: 2-D convolution using FFTW3 everyone, I want to do a 2D real discrete convolution using FFTW3, can anybody hel me?=== Subject: C routines for Special FunctionsSome heroes out there generously provide a tarball(usually called specfun.tar.gz) containingroutines that compute special functions like Gamma,Confluent Hypergeometric, Struve, and other dardand exotic beasts. I've found ts collection inFortran77 and Matlab (see links below), but I've beenunable to locate the analogous routines written in C.Does anyone know a link where I can get these routinesin C?Here's some links for the interested:Fortran77 http://iris-lee3.ece.uiuc.edu/~jjin/routines/ routines.htmlMatlab http://ceta.mit.edu/comp_spec_func/=== Subject: Re: C routines for Special Functions so much for the Fortran Source> Some heroes out there generously provide a tarball> (usually called specfun.tar.gz) containing> routines that compute special functions like Gamma,> Confluent Hypergeometric, Struve, and other dard> and exotic beasts. I've found ts collection in> Fortran77 and Matlab (see links below), but I've been> unable to locate the analogous routines written in C.> Does anyone know a link where I can get these routines> in C?Here's some links for the interested:Fortran77 > http://iris-lee3.ece.uiuc.edu/~jjin/routines/ routines.htmlMatlab > http://ceta.mit.edu/comp_spec_func/===Subject: Re: C routines for Special Functions> Some heroes out there generously provide a tarball> (usually called specfun.tar.gz) containing> routines that compute special functions like Gamma,> Confluent Hypergeometric, Struve, and other dard> and exotic beasts. I've found ts collection in> Fortran77 and Matlab (see links below), but I've been> unable to locate the analogous routines written in C.> Does anyone know a link where I can get these routines> in C?Some sources of C code for special functions, the first two being themost important, areC Mathematical Function Handbook (1992)by Louis Baker Atlas for Computing Mathematical Functions: An Illustrated Guide forPractitioners: With Programs in C and Mathematica (1997)by William J. ThompsonA Numerical Library in C for Scientists and Engineers (1994)by H. T. Lauwww.nr.comNumerical Recipes in C, 2nd Edition (1992)by Press, Flannery, Teukolsky, and Vetterling===Subject: Re: C routines for Special FunctionsDistribution: inet> Some heroes out there generously provide a tarball> (usually called specfun.tar.gz) containing> routines that compute special functions like Gamma,> Confluent Hypergeometric, Struve, and other dard> and exotic beasts. I've found ts collection in> Fortran77 and Matlab (see links below), but I've been> unable to locate the analogous routines written in C.> Does anyone know a link where I can get these routines> in C?I did a Google search for Computation of Special Functions C sourceand found: http://www.esg.dees.unict.it/esg/gborzi/mathlib.html http://www.crbond.com/math.htmBut comp.lang.c is not comp.sources.wanted, so please take tsdiscussion elsewhere., -===Subject: Re: C routines for Special Functions>Some heroes out there generously provide a tarball>(usually called specfun.tar.gz) containing>routines that compute special functions like Gamma,>Confluent Hypergeometric, Struve, and other dard>and exotic beasts. I've found ts collection in>Fortran77 and Matlab (see links below), but I've been>unable to locate the analogous routines written in C.>Does anyone know a link where I can get these routines>in C?Have a look at http://www.netlib.org/cephes/. GSL ties you into a numberof bad design decisions that make it clumsy to use.===Subject: Re: C routines for Special Functions> Have a look at http://www.netlib.org/cephes/. GSL ties you into a number> of bad design decisions that make it clumsy to use.response to another poster, I am aware of the GSLsoftware. I avoid it when I can for a variety of reasons,none of them particularly deep. I'll mention a couple oftngs though. I don't like the cumbersome routine nameswith gsl_blah_blah tacked onto everytng in sight. Itmakes for ugly code, in my opinion. Second, they'll havetngs like the F-distribution, but no function for theinverse of the F-distribution. Tngs like that are annoying...GSL is incomplete for my purposes. Fortran and Matlab havemany free routines available for the special functions and Ijust figured the same tng was out there for C, that's all.By the way, from my brief perusal of ts newsgroup, I must sayI'm stunned that so much time is spent by people bitcng aboutnetiquette (for what seem usually to be rather innocent or trivialbreaches). Must be that programmer mentality at work...===Subject: Re: C routines for Special Functions> GSL ties you into a number of bad design decisions> that make it clumsy to use.Would you care to elaborate?===Subject: Re: C routines for Special Functions>> GSL ties you into a number of bad design decisions>> that make it clumsy to use.>Would you care to elaborate?Of course ts is just my opinion. I tnk the GSL group is doinga great service and since the code is GPL I should really be rollingup my sleeves and coding instead of complaining. :-)When the first example program in their documentation defines 'intmain(void) { ... }' you have to wonder a bit. Why the 'void'? Itis perfectly legal, just odd looking and unnecessary. When I wasevaluating ts for use in a production library at a large EquityDerivatives firm a couple of years ago, I kept finding 'odd' tngs.Ultimately I chose a Fortran library because GSL was not sufficientlymature at that time. It has definitely come a long way since then.If you belive a modern library should be written in C instead of C++,you can stop reading now. Many of my qualms are due to issues relatingto the gyrations GSL goes to because it does not use C++. I've takenflak over the years for insisting on writing certain libraries in C (andeven more flak for using Fortran) but I have come to the conclusion thatthe small audience that insists on C is, well, small. I'm open to dataindicating otherwise.Error HandlingI'm not a fan of the 'int status = gsl_function(...); if (status){...' method of error handling for functions that return doubles.I am especially not a fan of having default error handlers callabort(), like the assert macro in C. Of course I've had the headof IT tear me a new asshole when a programmer of mine left an assertin production code that got called 15 minutes before et open,so I can't claim to be unbiased.GSL does have 'natural form' calling conventions available (morecode on their side to maintain) but they do not permit errorchecking. I prefer returning NaN's that have embedded errorinformation. If you don't check the return codes, at least yourprogram is more likely to return gibberish than to crash.Vector and Matrix RoutinesThey do a fine job, but I would love to see sometng more alongthe lines of http://okmij.org/ftp/LinAlg.README.txt. I've tried outevery vector/matix library on the planet, I tnk, from BLAS and LAPACKto the compiler busting Blitz++. Simple C++ wrappers for the former seemto be the best solution for my needs.General CommentsExcessive use of C macros in source code. Makes the code hard tounderd/fix/maintain.Not modular. Dependencies between modules should be explicit.At any rate, that's my 2 cents. Feel free to disagree, it's an internetnewsgroup after all. Comments are welcome.===Subject: Re: C routines for Special Functions> When the first example program in their documentation defines 'int> main(void) { ... }' you have to wonder a bit. Why the 'void'? It> is perfectly legal, just odd looking and unnecessary.... and I replied that in C, as opposed to C++, it is necessary.That was an error; I apologize. It is unnecessary in C as wellas in C++. However, I don't tnk it's odd looking in C. Afterall, when you're declaring but not defining a no-argument functionin C you have to[1] include the void, so C programmers areused to seeing no-argument functions with (void) for argument list. [1] If you want the compiler to be able to check that the function is being used properly, anyway.-- === Subject: Re: C routines for Special Functions> GSL ties you into a number of bad design decisions> that make it clumsy to use....> When the first example program in their documentation defines 'int> main(void) { ... }' you have to wonder a bit. Why the 'void'? It> is perfectly legal, just odd looking and unnecessary.It would be unnecessary in C++, but not in C.> I'm not a fan of the 'int status = gsl_function(...); if (status)> {...' method of error handling for functions that return doubles.> I am especially not a fan of having default error handlers call> abort(), like the assert macro in C. Of course I've had the head> of IT tear me a new asshole when a programmer of mine left an assert> in production code that got called 15 minutes before et open,> so I can't claim to be unbiased.GSL does have 'natural form' calling conventions available (more> code on their side to maintain) but they do not permit error> checking. I prefer returning NaN's that have embedded error> information. If you don't check the return codes, at least your> program is more likely to return gibberish than to crash.It could be argued that it's better for your programto crash than to return gibberish, especially if it'sbecause you haven't bothered to check for errors...-- ===Subject: Re: C routines for Special FunctionsSee the GNU GSL library.===Subject: Re: C routines for Special Functions> See the GNU GSL library. http://sources.redhat.com/gsl/===Subject: Finding all possible bit patternsI am looking for a formula to calculate the number of all possibledifferent patterns of bit with the following parameters:- The vector has 13 free spaces.- There are 7 bits to place.For example, here are all the possibilities for a vector with 4 freespaces and 2 bits to place.110010101001011001010011Total = 6 possibilities. very much.===Subject: Re: Finding all possible bit patternsI am looking for a formula to calculate the number of all possible> different patterns of bit with the following parameters:- The vector has 13 free spaces.> - There are 7 bits to place.For example, here are all the possibilities for a vector with 4 free> spaces and 2 bits to place.1100> 1010> 1001> 0110> 0101> 0011Total = 6 possibilities. very much.The answer is the binomial coeffient pronounced 13 choose 7. Youusually see it written as a large set of parentheses with one letteror number above the other, but without a fraction bar, such as/ 13 | |. 7 / The formula for n choose k is n!/((n-k)! * k!), where theexclamation point indicates factorial. Thus, in your example, 4choose 2 = 4!/((4-2)! * 2!) = 4!/(2! * 2!) = 1*2*3*4/(1*2 * 1*2) =24/4 = 6. I'll let you work out 13 choose 7.Dave===Subject: Re: Finding all possible bit patternsI am looking for a formula to calculate the number of all possible> different patterns of bit with the following parameters:- The vector has 13 free spaces.> - There are 7 bits to place.For example, here are all the possibilities for a vector with 4 free> spaces and 2 bits to place.1100> 1010> 1001> 0110> 0101> 0011Total = 6 possibilities. very much.let n be free spaces, m be places to putpossibilities = n choose m := n!/(m!*(n-m)!)===Subject: 2D discrete hartley transformI'm trying (unsuccessfully) to find some C code that can perform a 2D-DHT onreal-valued data obtained from a 2D image. Does anyone have workable codethey are willing to share? I've been plugging away with the implementationof fftw_dhtin fftw, but I'm finding it more than challenging to sort through theircode.-- === Subject: Re: 2D discrete hartley transform> I'm trying (unsuccessfully) to find some C code that can perform a 2D-DHT on> real-valued data obtained from a 2D image. Does anyone have workable code> they are willing to share? I've been plugging away with the implementation> of fftw_dht> in fftw, but I'm finding it more than challenging to sort through their> code.Note, first of all, that the true 2D DHT is not the separable product of 1D DHTs along the rows and columns (unlike the 2D DFT). FFTW's DHT would compute the latter if you ask it for a 2d transform, as described in the manual...you need an additional post-processing pass for the non-separable 2D DHT (see the FFTW manual for references). I haven't seen any other free code that computes a true 2d DHT lying around, either; it's all 1d DHTs.Second, why do you need a 2D DHT? I'm very curious to know what it is good for that a 2D real-input DFT is not as good or better at.Trd, if by sort through their code you mean compile it, I'm guessing you are a Windows user, in wch case see fftw.org/install/windows.html for precompiled packages; otherwise, compilation is easy. If you want to read source code for learning the algorithms, though, then FFTW is not ideal for beginners.=== Subject: Sorgenfrey line / closed-open topology by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i113m1x28883;R with the closed-open topology IS separable, first countable (it hasa countable open base), but NOT secound countable.Since any separable metric space is second countable, we see thatR with ts topology is not a metric space (not metrizable).In fact, every second countable, normal T1-space is metrizable;R with the closed-open topology is normal and T-1 but not secondcountable. ===Subject: Problems with equationsI need to solve these equations:|x+a|=Sqrt[(y-b)^2+(z-c)^2]|x+d|=Sqrt[(y-e)^2+(z-f)^ 2]|x+g|=Sqrt[(y-h)^2+(z-i)^2]where x,y,z - variablesCould someone, who has Mathematica program or sth else, solve theseequations and send me solution (txt, jpg, ... etc). Please.Solution can be very large.===Subject: Re: Problems with equations> I need to solve these equations:|x+a|=Sqrt[(y-b)^2+(z-c)^2]> |x+d|=Sqrt[(y-e)^2+(z-f)^2]> |x+g|=Sqrt[(y-h)^2+(z-i)^2]where x,y,z - variablesCould someone, who has Mathematica program or sth else, solve these> equations and send me solution (txt, jpg, ... etc). Please.Solution can be very large.It doesn't look that hard. Let's give it a try...Start by squaring both sides of each equation.(x+a)^2 = (y-b)^2+(z-c)^2(x+d)^2 = (y-e)^2+(z-f)^2(x+g)^2 = (y-h)^2+(z-i)^2Now expand the binomials.x^2 + 2ax + a^2 = y^2 -2by + b^2 + z^2 - 2cz + c^2x^2 + 2dx + d^2 = y^2 -2ey + e^2 + z^2 - 2fz + f^2x^2 + 2gx + g^2 = y^2 -2hy + h^2 + z^2 - 2iz + i^2Subtract the second from the first, subtract the trd from the first,and then subtract the trd from the second.2ax - 2dx + a^2 - d^2 = -2by + 2ey - 2cz + 2fz + b^2 - e^2 + c^2 - f^22ax - 2gx + a^2 - g^2 = -2by + 2hy - 2cz + 2iz + b^2 - h^2 + c^2 - i^22dx - 2gx + d^2 - g^2 = -2ey + 2hy - 2fz + 2iz + e^2 - h^2 + f^2 - i^2Put the x, y, and z terms on the left and the conts on the right,and factor.(2a-2d)x + (2b-2e)y + (2c-2f)z = -a^2 + b^2 + c^2 + d^2 - e^2 - f^2(2a-2g)x + (2b-2h)y + (2c-2i)z = -a^2 + b^2 + c^2 + g^2 - h^2 - i^2(2d-2g)x + (2e-2h)y + (2f-2i)z = -d^2 + e^2 + f^2 + g^2 - h^2 - i^2Now, you notice that the three equations are linearly dependent: thetrd equation equals the second minus the first. Thus, you reallyhave two equations in three unknowns. Therefore, you can't expect aunique solution.Tnk about the two-dimensional version of your equations: twoequations involving only x and y. They would represent theintersection of two circles. There are four cases: the circles areidentical so that they intersect at an infinite number of points, (2)the circles overlap so they intersect at two points, (3) the circlesare tangent so they intersect at only one point, or (4) the circlesmiss each other completely so they do not intersect at all.In your case, you have the intersection of three spheres, so you havecorrespondingly more possibilities. I am going to leave you to findthe general solution of the any set of two of the above three linearequations. If the conts a through i are such that the equationsare consistent, then there will be one or more solutions. Otherwise,there will be no solutions.Dave===Subject: Re: Problems with equations> I need to solve these equations:|x+a|=Sqrt[(y-b)^2+(z-c)^2]> |x+d|=Sqrt[(y-e)^2+(z-f)^2]> |x+g|=Sqrt[(y-h)^2+(z-i)^2]...> x^2 + 2ax + a^2 = y^2 -2by + b^2 + z^2 - 2cz + c^2> x^2 + 2dx + d^2 = y^2 -2ey + e^2 + z^2 - 2fz + f^2> x^2 + 2gx + g^2 = y^2 -2hy + h^2 + z^2 - 2iz + i^2...> (2a-2d)x + (2b-2e)y + (2c-2f)z = -a^2 + b^2 + c^2 + d^2 - e^2 - f^2> (2a-2g)x + (2b-2h)y + (2c-2i)z = -a^2 + b^2 + c^2 + g^2 - h^2 - i^2> (2d-2g)x + (2e-2h)y + (2f-2i)z = -d^2 + e^2 + f^2 + g^2 - h^2 - i^2Now, you notice that the three equations are linearly dependent: the> trd equation equals the second minus the first. Thus, you really> have two equations in three unknowns. Therefore, you can't expect a> unique solution.But you've thrown away some information with all thesubtraction you've done. What you have there is P-Q, P-R, Q-R,and those *aren't* equivalent to P,Q,R.> In your case, you have the intersection of three spheres, so you have> correspondingly more possibilities.They are cones, not spheres. But it's much better to tnkof it as the intersection between *one* cone and the solutionto two of those linear equations.-- ===Subject: Re: Problems with equations> I need to solve these equations:|x+a|=Sqrt[(y-b)^2+(z-c)^2]> |x+d|=Sqrt[(y-e)^2+(z-f)^2]> |x+g|=Sqrt[(y-h)^2+(z-i)^2]where x,y,z - variablesTs looks like a homework problem to me. Here aresome nts. - You can get rid of the square roots. - What happens when you subtract one of the resulting equations (after eliminating the square roots) from another?-- ===Subject: intriguing numbers. by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i11Cisg08313;i just read sometng in a magazine (forgot what title.) a smalltrue or not. because it seems very interesting. two numbers intriguedme. one is the number (psi) and they said that its the so-calledlast finite number. the number right before infinity. and a veryshort mention on sometng called the end number. the end number isthe ghest in the kingdom of numbers and makes absolute infinity adust on its shoulder. notng is gher than the end number because bytheory it is the last number. now i was very intrigued and suddenly itbecame my favorite number. so please verify ts for me.===Subject: Re: intriguing numbers.I tnk you are nuts! If you would like to learn more about the(real) math of infinity, check out ts page from mathworld and thepages linked to it.http://mathworld.wolfram.com/Aleph-0.html ===Subject: small eigenvalues Suppose 0<=l1 <= l2 <= ... <=ln are the eigenvalues of a real symmetric matrix. Let lr be the first non-zero eigenvalue, i.e. 0=l1=...=l(r-1)