mm-154 I need to use error function urgently in my program. could you pleasegive me the links to websites explaining what is an error functionwith worked out examples and code for using it in a program.thank you very much!sunny =You will find code in Fortran for the error function at my web site (seesignature below).--Alan Millerhttp://users.bigpond.net.au/amillerRetired Statistician>> i need to use error function urgently in my program. could you please> give me the links to websites explaining what is an error function> with worked out examples and code for using it in a program.>> thank you very much!> sunny =I'm looking at the following problem:PA = LU (P a permutation matrix, LU the usual factors)B = A + u e_i^T ( note this is only changing one column of A ) so thenP(A + u e_i^T) = PB = L(U + w e_i^T) Lw = Puif we let V = U + w e_i^Tand P1 V = L1 U1 then we can get the LU-factors of B ie. P B = L2 U2as L2 = L P1^T L1 and U2 = U1.Obviously, the fact that V is upper triangular except for the ithcolumn can be exploited, ie. from the standpoint of applying Gausstransforms, you will have to apply n-i transforms. So if the ithcolumn is one of the 'rst columns, isn't itthe case that there isn't going to be much savings in work? It looksto me like it's going to be something like O(n(n-i)^2). Am I missingsomething, or is this just the price of doing business?Ryan =An updated version of DMSUITE (A MATLAB Differentiation MatrixSuite) by Satish Reddy and myself is now available. Larry Shampineinformed us that several of the functions failed to executeunder MATLAB Release 13, and these corrections, along with a fewsmaller ones, have now been made.The suite is freely available for download from the MathWorks Web Site:please go to http://www.mathworks.com/matlabcentral/'leexchange/and follow the links MATHEMATICS -> DIFFERENTIAL EQUATIONS.If you 'nd the suite useful, please complete the review on that page.DMSUITE also has a Web Site (and hopefully soon a guest book) athttp://dip.sun.ac.za/~weideman/research/differ.htmlThis Web Site replaces the old one at ucs.orst.edu, whichwill soon cease to exist. Please update bookmarks accordingly.For those readers unfamiliar with DMSUITE, here is an abstractfrom the accompanying paper, which was published in ACM TOMS,Vol. 26, pp. 465--519 (2000):Abstract: A software suite consisting of seventeen MATLAB functionsfor solving differential equations by the spectral collocation(a.k.a. pseudospectral) method is presented. It includes functions forcomputing derivatives of arbitrary order corresponding to Chebyshev,Hermite, Laguerre, Fourier, and sinc interpolants. Auxiliary functionsare included for incorporating boundary conditions, performinginterpolation using barycentric formulas, and computing roots oforthogonal polynomials. It is demonstrated how to use the packagefor solving eigenvalue, boundary value, and initial value problemsarising in the 'elds of special functions, quantum mechanics, nonlinearwaves, and hydrodynamic stability.JAC (Andre') WeidemanDepartment of Applied MathematicsUniversity of StellenboschStellenbosch 7600South Africa =I have a positive semide'nite matrix A, which is projected using an ortonormal basis Q build using Krylov vectors [x | A^(-1)x | A^(-2)x | ...] . How to prove that Ritz values after projection are concentrated around the smallest eigenvaluea of A, i.e. that the norm (2) of Q^T * A * Q is much smaller then norm (2) of A ? = >I have a positive semide'nite matrix A, which is projected using an >ortonormal basis Q build using Krylov vectors [x | A^(-1)x | A^(-2)x | >...] . How to prove that Ritz values after projection are concentrated >around the smallest eigenvaluea of A, i.e. that the norm (2) of Q^T * A >* Q is much smaller then norm (2) of A ? > see B. Parlett: the symmetric eigenvalue problem eigenvalue of Q^T(A^-1)Q = value of a Rayleighquotient of Q^T(A^-1)Q = z^TQ^T(A^-1)Qz for some z with z^Tz=1 let y=Qz then this is a Rayleighquotient y^TA^{-1}y approximating one of the dominant eigenvalues of A^{-1} hence the reciprocal of one of the small eigenvalues of A.hope this helpspeter =ich habe folgendes System:dx/dt=f(x,u)mitf(x,u)=u+k*sign(x)+r*xEs ist nat.9frlich nicht-linear und deshalb versuche ich es in matlab zusimulieren. Benutze das Runge-Kutta 4(5) mit step size control. Dazuintegriere zun.8achst .9fber eine bestimmte Zeit vorw.8arts, nehme mir denletzten wert und integriere dann r.9fckw.8arts (dazu drehe ich einfach dasVorzeichen des step size). Ich m.9fsste theoretisch wieder auf den Endwertkommen.Das funktioniert soweit ganz gut, solange r und k nicht gross genugsind. Sobald sie ungleich 0 sind, gibt es schon Abweichungen aber zumBeispiel f.9fr ein r>0.5 bekomme ich die Anfangsfunktion .9fberhaupt nichtmehr hin.Nun hab ich gelesen, dass R.9fckw.8artsintegrationen nicht immer eindeutigfunktionieren. Hat jemand eine Idee, wann es funktionieren k.9annte undwann nicht?? Stichwort: Controllability und Reachability, hat wer wasschriftliches, wie man die reachability von einem nicht-linearen Systemberechnen kann??Danke im voraus,omar I'm working on a project that requires sketch a surface knowing several> (rather many but not enough) points on that surface. I need to estimate> other points...> Some one told me that Fourier analysis can handle this kind of problem.I don't think so. What you want is called Oscattered data interpolation';many links are given in http://www.mat.univie.ac.at/~neum/surface.html[~ is a tilde]Arnold Neumaier > I'm working on a project that requires sketch a surface knowing several> (rather many but not enough) points on that surface. I need to estimate> other points...>> Some one told me that Fourier analysis can handle this kind of problem.>> I don't think so.> What you want is called Oscattered data interpolation';> many links are given in> http://www.mat.univie.ac.at/~neum/surface.html> [~ is a tilde]>> Arnold NeumaierRadial basis functions (RBF) spring to mind. Here one constructs the surfaceusing the scattered shifts of some basis function. If you know the surfaceat the points x_1,...,x_M then one could use:sum_{j=1}^M a_j phi(x-x_j)as an approximation to the surface given an appropriate basis function phi.The coef'cients a_j being determined by the ensuing interpolationequations:sum_{j=1}^M a_j phi(x_i-x_j) = f(x_i), i=1,...,M.There are several popular choices for the basis function. One could usephi(x)=exp(-|x|^2/2) for example in any space dimension. In 2-dimensionsphi(x)=|x|^2ln|x| is popular and the resulting interpolant is often calledthe thin plate spline (TPS). Sometimes (for example with the TPS) apolynomial term and additional constraints are added to the above toguarantee the solvability of the system.RBF Interpolants are a multivariate analogy of the well-loved naturalsplines from 1-d.R =I am looking for an equation for a curve that is like an ellipse butnot quite. It is not circle, either.I have a set of points {(x0,y0), (x1,y1), (x2,y2), ..., (xN,yN)},where (xN,yN) == (x0,y0), that look a lot of like an ellipse whenplotted, and I would like to 't a closed curve on them.(I have tried an ellipse but I want something better.)Any ideas? = >I am looking for an equation for a curve that is like an ellipse but >not quite. It is not circle, either. >I have a set of points {(x0,y0), (x1,y1), (x2,y2), ..., (xN,yN)}, >where (xN,yN) == (x0,y0), that look a lot of like an ellipse when >plotted, and I would like to 't a closed curve on them. >(I have tried an ellipse but I want something better.) > >Any ideas?you can use a parametric periodic spline:invent an arti'cial parameter (s) for the curve, for examplethe arclength of the continuous piecewise linear interpolating path.then interpolate the components x and y of your points separately by anperiodic psline, using the 'rst data point also as the last one. (that is you interpolate (s(i),x(i)) and (s(i),y(i)) by two periodicsplines.) then your curve will be closed C2 :C : (x(s),y(s)) : 0<= s <= smax hope this helpspeter I am looking for an equation for a curve that is like an ellipse but>not quite. It is not circle, either.>>I have a set of points {(x0,y0), (x1,y1), (x2,y2), ..., (xN,yN)},>where (xN,yN) == (x0,y0), that look a lot of like an ellipse when>plotted, and I would like to 't a closed curve on them.>>(I have tried an ellipse but I want something better.)>>Any ideas?> you can use a parametric periodic spline:> invent an arti'cial parameter (s) for the curve, for example> the arclength of the continuous piecewise linear interpolating path.> then interpolate the components x and y of your points separately by an> periodic psline, using the 'rst data point also as the last one.> (that is you interpolate (s(i),x(i)) and (s(i),y(i)) by two periodic> splines.) then your curve will be closed C2 :> C : (x(s),y(s)) : 0<= s <= smax> hope this helps> peterTry the family: (x/a)^n + (y/b)^n = 1with n > 2 . Of course, n=2 is an ellipse centered at the origin.-- Julian V. NobleProfessor Emeritus of ^^^^^^^^^^^^^^^^^^http://galileo.phys.virginia.edu/~jvn/ Science knows only one commandment: contribute to science. -- Bertolt Brecht, Galileo. =HeyAfter working on this problem for a while now and with nosolution that works for all cases I had to realize my math skillsare just not good enough. Maybe someone here can shed some light onthis problem.Imagine a right triangle divided into discreet elements, think texture map. The triangle is n elements wide and m elements high. Element (0,0) is in the lower left corner,(n-1,0) is lower right and (0,m-1) upper left. The elements are numbered as (0,0)=0 ,(1,0) = 1(0,1) = n. The complete number of elements for the right triangle are n*m/2 + n/2 or m/2 depending on which is largest,n or m.Every element that the hypotenuse pierces belongs to the triangle. n and m are power of two.My question is, how would one compute the height([0..m-1]) of an element given its number, without using any iterative method?Below is an example of an 2x4 triangle in ascii art, XX is one element:XX XX XX XXXX XXElement number 0 has height 0. Element number 4 has height 2.Element number 5 has height 3.The methods I have tried so far fails when width/heigh < 1/8. I'musing 32bit §oats so it isn't really a precision problem.Width andheight are 256 maximum.All help/comments greatly appreciated!/Mathias The methods I have tried so far fails when width/heigh < 1/8.To be honest, when width/height < 1 is where I have problems derivinga solution. When width/height>=1 the height(y) can be written asy*width - k(y * (y - 1))/2 = elementNbr ;where k=width/heightBut for k<1 I end up with step functions and who knows what. I must bedoing something wrong./Mathias = >kind of probabilistic distribution (exponential, lognormal, or whatever) >that these data points are exhibiting. If it 'ts one of the >distributions, what are the parameters of the distribution? Is there any >good software that allows me to perform this task? I tried Matlab, and >- >Hai >in matlab (lsqnonlin you must have the model already. try this :(from my annotations)begin{citation} CurvFit (tm) ... v 3.01 announcement. -------------------------------------CurvFIT (tm) is a curve'tting program; a Power, Exponential,and Lorentzian series are available models to try to matchyour data. Learn to Oread' eigenvalues of the Jacobian andHessian matrices. This is an example of Calculus levelprogramming ... i.e. minutes to solve, days or years tounderstand solution and what it implies (e.g. wrong model,sampling rate error, etc.)To download this Shareware program (1.5 Mb 'le), point your browser at the URL: http://www.simtel.net/pub/pd/52762.shtml(zip version) or http://www.Lanset.com/ecb/CurvFit.htm (ourweb page).Enjoy!Phil Brubakerend{citation}hope it does what you want peter =However, Robert, I am not sure if all BA^T matrices are symmetric andpostive de'nite.However, I have 'gured out the solution.The least square solution requires that I solve A^T A X = A^T BNow transposing the same equation and adding it, we haveA^T A X + X A^T A = A^T B + B^T AThe above eqn is Lyapunov equation, and the solution is guranteed if A^TA has all eigen values <0 i.e. is stable and right hand side issymmetric.Right hand side is symmetric. Now in my case, I can also prove thatright hand side is postive de'nite and left hand matrix is stable. So Iwill always get the postive de'nite and symmetric solution of the aboveequation.Once the proof is complete, the above equation can also be solved by'rst replacing X by its SVD and then rearranging the terms.In this case, we have someting like this:(A^TA d_1 - A^TB)r_i = 0, where d_1 are the eigen values and r_i is therow vectors of R, X = R^T D R. This is a pencil equation can be solvedusing QZ decomposition.navneet>>I have to sovle AX= B for matrix X,> >where A is nXd matrix, X = dXd matrix and B = nXd matrix and n>>d>>The constraint is X should be symmetric and postive de'nite.>> I think this may help:> Your equation implies>> AXA^T = BA^T>> (^T = transpose)>> so C = BA^T must be symmetric and positive semide'nite.>> Robert Israel israel@math.ubc.ca> Department of Mathematics http://www.math.ubc.ca/~israel> University of British Columbia> Vancouver, BC, Canada V6T 1Z2 However, Robert, I am not sure if all BA^T matrices are symmetric and>postive de'nite.>However, I have 'gured out the solution.>The least square solution requires that I solve A^T A X = A^T B>>Now transposing the same equation and adding it, we have>>A^T A X + X A^T A = A^T B + B^T A>>The above eqn is Lyapunov equation, and the solution is guranteed if A^T>A has all eigen values <0 i.e. is stable and right hand side is>symmetric. if A^T A has all eigen values < 0will be a bit of a problem as this is well known to be positive de'nitewhen A is of full column rank. Maybe you can 'nd spare minus signs tochange the signs of both sides of equation.>Right hand side is symmetric. Now in my case, I can also prove that>right hand side is postive de'nite and left hand matrix is stable. So I>will always get the postive de'nite and symmetric solution of the above>equation.>>Once the proof is complete, the above equation can also be solved by>'rst replacing X by its SVD and then rearranging the terms.>In this case, we have someting like this:>(A^TA d_1 - A^TB)r_i = 0, where d_1 are the eigen values and r_i is the>row vectors of R, X = R^T D R. This is a pencil equation can be solved>using QZ decomposition.>>navneet>> >I have to sovle AX= B for matrix X,>>where A is nXd matrix, X = dXd matrix and B = nXd matrix and n>>d>>The constraint is X should be symmetric and postive de'nite.>> I think this may help:>> Your equation implies>> AXA^T = BA^T>> (^T = transpose)>> so C = BA^T must be symmetric and positive semide'nite.>> Robert Israel israel@math.ubc.ca>> Department of Mathematics http://www.math.ubc.ca/~israel>> University of British Columbia>> Vancouver, BC, Canada V6T 1Z2> I have to sovle AX= B for matrix X,> where A is nXd matrix, X = dXd matrix and B = nXd matrix and n>>d> The constraint is X should be symmetric and postive de'nite.> Can someone Lagrange multipliers to adjoin the symmetric constraint:J = (AX-B)'(AX-B)+ L(X-X'), and make J stationary wrt X,L.Adjoining the SPD constraint is much tougher since that leadsto inequality constraints, and a NLP. I'm not quite sure what happens in general if A does not have full>column rank. Things seem to be more complicated.Choosing the appropriate orthogonal coordinate systems, we can write [ U 0 ] [ B1 B2 ]A = [ 0 0 ], B = [ B3 B4 ]in block matrix form, where the 'rst block of rows is for Ran(A^T),the second for Ker(A), and the 'rst block of columns is for Ran(A),the second for Ker(A^T); U maps Ran(A^T) one-to-one onto Ran(A). [ X1 X2 ]Then if X = [ X2^T X3 ], the equation AX = B becomes[ UX1 UX2 ] [ B1 B2 ][ 0 0 ] = [ B3 B4 ],i.e. we need B3 = B4 = 0, X1 = U^(-1) B1 and X2 = U^(-1) B2.In order for X1 to be symmetric, U^(-1) B1 = B1^T (U^(-1))^Twhich is equivalent to B1 U^T = U B1^T. For X1 to be positivede'nite, we need B1 U^T to be positive de'nite. And then therewill be a condition on X4 to make X positive de'nite, which I believeis that X4 - X2^T X1^(-1) X2 must be positive de'nite.Robert Israel israel@math.ubc.caDepartment of Mathematics http://www.math.ubc.ca/~israel University of British Columbia Vancouver, BC, Canada V6T 1Z2 > if A^T A has all eigen values < 0>> will be a bit of a problem as this is well known to be positive de'nite> when A is of full column rank. Maybe you can 'nd spare minus signs to> change the signs of both sides of equation.>This is exactly the case in my scenario. I get a spare negtive sign from theright hand >>> I have to sovle AX= B for matrix X,>> where A is nXd matrix, X = dXd matrix and B = nXd matrix and n>>d>>> The constraint is X should be symmetric and postive de'nite.>>Doesn't AX = B already contrain X? I.e. constrain it to be A^{-1}*B.>>GC> navneetI think what you say has some merit, although A is not square. If Aand B have been speci'ed, then X is constrained. How do we know thatthe two constraints do not con§ict? If you read the posts that suggest taking a transpose and doingsomething, I think this offers the most promise and should be used tobring the rectangular matrices back to square ones.Writing A~ for A transpose rather than A^t, and A' instead of A^(-1),(A~A) X = (A~B)Now we have 3 d-by-d matrices, and if (A~A) has an inverse, what youare saying is true. If not, write C = (A~A), D = (A~B) and try todiagonalize PCP' as much as possible by 'nding (invertible) matrix Pwhich will make the equationPCP' PXP' = PDP'This should make 'nding a possible solution for PXP' (in terms ofarbitrary contants) and hence for X much more systematic. Thesepossible solutions must be resubstituted in the original equation,since multiplying by A~ may have weakened the original constraint.I don't see any guarantee that a symmetric solution for X can alwaysbe found, though maybe someone can show me otherwise. I have to sovle AX= B for matrix X,> where A is nXd matrix, X = dXd matrix and B = nXd matrix and n>>d> The constraint is X should be symmetric and postive de'nite.> Can someone Here is a LS + LM solution for a n=4, d=2 test example: A' = [ 9 3 7 6 ] B' = [ 6 4 1 5 ] [ 1 2 5 7 ] [ 1 8 6 7 ] X = [ X11 X12 ] [ X21 X22 ]Mathematica gives X11 = -810/1787 + X22 , X12 = X21 = 6010/5361 - X22;X is PD for X22 > 3612010/5141199 = 0.702562 ...The PD condition was checked graphically; for bigger matrices a NLPapproach seems necessary.LS with no multiplier followed by ad-hoc symmetrization (X+X')/2 givesX= [ 3580/5361 - X12, (6010/5361 + X12 - X22)/2 ] [6010/5361 + X12 - X22)/2 X22 ]which has 2 free parameters. =1. i'm not a mathematician, just a mechanical engineer.i have a systemdx/dt=f(x,u)withf(x,u)=u+k*sign(x)+r*xit's nonlinear and i'm trying to simulate it in matlab. I'm usingRunge-Kutta 4(5) with step size control. I run the integration for aspeci'ed time (let's say 20 sec) then take the resulting values (x) andtry to backwards integrate over this function over the same amount oftime. What i actually do is just turn the step size to a negative one.The outcome should be the initial value.This seems to work for small ks and rs (see equation). But if i try toset the r and k to different values the two graphs aren't equal at all.Now i read that backward integrated functions aren't allways unique.Could someone help me out. Keywords could be controllability andreachability, i'm still reading into these but nothing usefull yet.thnx in advance. = >1. i'm not a mathematician, just a mechanical engineer. >i have a system >dx/dt=f(x,u) >with >f(x,u)=u+k*sign(x)+r*x >it's nonlinear and i'm trying to simulate it in matlab. I'm using >Runge-Kutta 4(5) with step size control. I run the integration for a >speci'ed time (let's say 20 sec) then take the resulting values (x) and >try to backwards integrate over this function over the same amount of >time. What i actually do is just turn the step size to a negative one. >The outcome should be the initial value. >This seems to work for small ks and rs (see equation). But if i try to >set the r and k to different values the two graphs aren't equal at all. >Now i read that backward integrated functions aren't allways unique. >Could someone help me out. Keywords could be controllability and >reachability, i'm still reading into these but nothing usefull yet. >thnx in advance.the backward per se is not the problem for an ordinary differential equationsinitial value problem, but of course the stability of the equation .your f is not lipschitz continuous in x, hence does not satisfy the picard lindeloef unicity theorem, but this is not the point here.say, if you integrate y'=lambda*y with Re(lambda)<0 forward in time,then you have a stable situation and if your stepsize sats'es the stabilityproperty for ode4(5), (h*abs(lambda)<1 say, this is not at the boundaryof the stability region, this latter depends on the speci'c coeffs ofyour 4(5) formula, there are many) then there is a damping of old errorshence the global error is essentially in the same order of magnitudeas the local error, hence small. but if you reverse the direction, your solution grows exponentially and of course the local errors madeat time t are mani'ed at time t1>i have a system>>dx/dt=f(x,u)> >with>f(x,u)=u+k*sign(x)+r*x>>it's nonlinear and i'm trying to simulate it in matlab. I'm using>Runge-Kutta 4(5) with step size control. I run the integration for a>speci'ed time (let's say 20 sec) then take the resulting values (x) and> >try to backwards integrate over this function over the same amount of>time. What i actually do is just turn the step size to a negative one.>The outcome should be the initial value.>>This seems to work for small ks and rs (see equation). But if i try to>set the r and k to different values the two graphs aren't equal at all.>>>Now i read that backward integrated functions aren't allways unique.> >Could someone help me out. Keywords could be controllability and>reachability, i'm still reading into these but nothing usefull yet.>>thnx in advance.> the backward per se is not the problem for an ordinary differential equations> initial value problem, but of course the stability of the equation .> your f is not lipschitz continuous in x, hence does not satisfy the > picard lindeloef unicity theorem, but this is not the point here.> say, if you integrate > y'=lambda*y with Re(lambda)<0 forward in time,> then you have a stable situation and if your stepsize sats'es the stability> property for ode4(5), (h*abs(lambda)<1 say, this is not at the boundary> of the stability region, this latter depends on the speci'c coeffs of> your 4(5) formula, there are many) then there is a damping of old errors> hence the global error is essentially in the same order of magnitude> as the local error, hence small. but if you reverse the direction, your > solution grows exponentially and of course the local errors made> at time t are mani'ed at time t1 exp(-r*(t-t1), hence for large values of r you obtain> naturally a large magni'cation of your small local errors. > but some other effect comes into mind looking at your equation:> in principle k enters as a constant external force.> hopefully you never experience a sign change in x. then you will have > a kink in x and the integrator will cause here a rather large error> (if not dying in the stepsize control).> hope this helps> peterAre you saying, i should be using a different runge-kutta for backwardintergration or what would be the solution to this problem??indeed, i have an error that looks like an e^(-x) function. And you'reright about the k-factor, since at these points (sign change in x) bothequations could diverge quite alot.thnx =I'm having a kind of a problem that I want to share with you. Hopefully youcan helpme.In order to determine the PID-settings of a process controller, I 'rst needto determine the transfer function of the process I'm tuning. The transferfunction usually takes the (laplace-)form:Kp/(t*s+1) * exp(-td*s)Where Kp is the gain of the process, t is the time constant of the processand td is the lag-time. s is the laplacian time.To determine Kp, t and td an experiment can be done that is called astep-response. For example opening a valve for a given amount and thenlooking how the process (§ow through the pipe) responds to this change.When I do this I plot the §ow as a funcion of time. As an example here'ssome typical data I collected earlier:t [s]| §ow [m3/s]1 | 1.02 | 1.03 | 1.04 | 1.15 | 1.36 | 1.67 | 2.58 | 3.99 | 5.410 | 7.011 | 8.412 | 9.313 | 9.614 | 9.815 | 9.916 | 10.017 | 10.018 | 10.019 | 10.020 | 10.0Next I determine the Kp, t and td graphically as follows: I estimate thepoint of in§ection on the graph and draw a tangent through it. The angle ofthe tangent determines Kp: tan(alpha)=Kp. For the above example I foundKp=1.58Then I determine td: Where the tangent crosses the 1m3/s line is thelag-time. td=6.1sFinally I can determine t: Where the tangent crosses the asymptote (10m3/s)at 11.8s. So, t= 11.8 - td =5.7sTherefore, the transfer function looks like this:1.58/(5.7*s+1) * exp(-6.1*s)Who can help me?-- SomeOne > I'm having a kind of a problem that I want to share with you. Hopefullyyou> can help> me.>> In order to determine the PID-settings of a process controller, I 'rstneed> to determine the transfer function of the process I'm tuning. The transfer> function usually takes the (laplace-)form:>> Kp/(t*s+1) * exp(-td*s)>> Where Kp is the gain of the process, t is the time constant of the process> and td is the lag-time. s is the laplacian time.>> To determine Kp, t and td an experiment can be done that is called a> step-response. For example opening a valve for a given amount and then> looking how the process (§ow through the pipe) responds to this change.>> When I do this I plot the §ow as a funcion of time. As an example here's> some typical data I collected earlier:> t [s]| §ow [m3/s]> 1 | 1.0> 2 | 1.0> 3 | 1.0> 4 | 1.1> 5 | 1.3> 6 | 1.6> 7 | 2.5> 8 | 3.9> 9 | 5.4> 10 | 7.0> 11 | 8.4> 12 | 9.3> 13 | 9.6> 14 | 9.8> 15 | 9.9> 16 | 10.0> 17 | 10.0> 18 | 10.0> 19 | 10.0> 20 | 10.0>> Next I determine the Kp, t and td graphically as follows: I estimate the> point of in§ection on the graph and draw a tangent through it. The angleof> the tangent determines Kp: tan(alpha)=Kp. For the above example I found> Kp=1.58> Then I determine td: Where the tangent crosses the 1m3/s line is the> lag-time. td=6.1s> Finally I can determine t: Where the tangent crosses the asymptote(10m3/s)> at 11.8s. So, t= 11.8 - td =5.7s>> Therefore, the transfer function looks like this:>> 1.58/(5.7*s+1) * exp(-6.1*s)>> As you can imagine I 'nd all this a bit tedious and I'd like to automate> this work. The data is available electronically. I'm guessing that itshould> be possible to mathematically determine the tangent of the curve in the> point of in§ection. If that would be possible I could write a smallprogram> that can calculate the Kp, t and td from the data gathered from> step-response experiments.>> But, alas my knowledge of mathematics leaves me begging at this point. I> have no idea how to 'nd the tangent in the point of in§ection based onan> array of data.> Who can help me?I wonder how you determined that Kp, the gradient at the point of in§exion,was 1.58 .With your data the point of in§exion will correspond to a maximum of thegradient. At time=9 the §ow is 5.4 and at time=10 the §ow is 7.0 . Hencethe average gradient of the curve during that second was 1.6 . Hence it islikely that the gradient at the actual point of in§exion was at least 1.6 .Anyway, you could just determine the second with the maximum gradient andassume that the point of in§exion occurs at the start of that second andthat the slope at the point of in§exion is the slope during that second.Adopting that approach with the above data gives:Point of in§exion occurs at time=9Kp = slope = 7.0-5.4 = 1.6/(10-9) = 1.6 [you had 1.58]So, the equation of the tangent is y=1.6x+cBut the tangent is assumed to pass through the point (9, 5.4)So, 5.4=1.6*9+cSo, c=-9So, the tangent is y=1.6x-9Or, x=(y+9)/1.6When y=1, x = 10/1.6 = 6.25, so lagtime (td) = 6.25 [you had 6.1]When y=10, x= 19/1.6, so your t = 11.9 [you had 11.8]Given the likely errors in measuring the times and the §ow rates, thismethod might be perfectly adequate.-- Clive Toothhttp://www.clivetooth.dk =The subjects: - The gentle discerning approximation of line-like graphicpatterns. - The uniform approximation of curves by segments with non-sharp(fuzzy) ends. It is the base for most universal tangent initialapproximation of arbitrary form curves. - The unison of parametrical (pose) hypotheses as an indicator oftemplate-matching.The contents:http://shulga.tripod.com/geometry/E.htmThe procedural collection created on this basis and the results of itsexperimental probation is described. The investigation had been doneon the contour preparations of actual half-tone images of compositionsformed from arbitrary shape (piecewise smooth) objects. =We have a sequential application which involves solving PDEs. We arenow looking at parallelizing the code - starting with solving the PDEs(parallely) using Petsc. Is there anyway I can integrate Petsc into myexisting application - has anybody done this sort of thing? Iunderstand it is possible to have Petsc interface to externalapplications, can we also do it the other way around?Any light shed on the