77 Reputation

4 Badges

16 years, 147 days

MaplePrimes Activity

These are replies submitted by evgeni

Thank you very much, Paulina. As I wrote, I am computing the residuals. It is not a big problem. A real problem is finding out necessary tools from the laconic Maple documentation. I thought naively that the regression and fitting tools might have an option of yielding the residuals. My experimental data are quasi-periodic and highly nonlinear. Therefore, I have to fit such data with a long piecewise function covering many periods. I cannot use the linear regression tools. Thanks again, Evgeni
Thank you very much for the advice. I have already found my way of plotting the residuals. I do not know still what should I enter into LSSolve to get the vector of residuals. I have to say that the documentation you refer to is just horrible. It looks like it is created for the authors themselves not for the users who badly need examples for each statement. I am spoiled by Mathematica and have to use Maple sometimes because some of its tools work better. Thank you very much for taking your time. Evgeni
Thanks for the suggestion. Of course, I have analyzed the content of the Application Center before I asked for a help and have not found a code string for plotting the residuals. Evgeni
Sorry, please read 'unknowns' instead of 'parameters' in the last sentence of my message. Evgeni
In short, it is computing a solution of a nonlinear equation system dependent on one (codimention 1), two (codimention 2) or more parameters. Small steps of the parameter variations allow using prediction-correction procedure, iterative solvers, and automatic parameter step adjustment combined. If you have a nonlinear algebraic system of n unknowns F=f(x, alpha) =0 dependent on a parameter alpha (codim 1 case) you might wish to know how the solution of F depends on the parameter variation. If the parameter changes with a small step then the solution computed for alpha[i] can be used as an initial approximation for computing solution for alpha[i+1] by using any iteration method. Using two neighbor solutions, computed for alpha[i] and alpha[i+1], allows predicting the solution for the next step, etc. The Maple’s implicitplot is a very inefficient way of solving a single equation dependent on two unknowns one of which can be arbitrary considered as a parameter (codim 1 case). In more sophisticated cases, F can depend on more parameters and represents ODE, ADE and PDE sets. Computing bifurcation diagrams for such sets is a standard task for the continuation procedures. AUTO (http://www.enm.bris.ac.uk/staff/hinke/dss/continuation/auto.html), content (http://www.enm.bris.ac.uk/staff/hinke/dss/continuation/content.html), and LOCA (http://www.cs.sandia.gov/loca/) are examples of very successful packages for bifurcation analysis based on the parameter continuation procedures developed for different platforms but sadly not for Maple. I believe Maple looses its competitive edge having no continuation procedures among its tools. The highly inefficient procedures of implicit and implicit3d should be rewritten to use a much more efficient continuation procedure. Then, once it is done, the both ones can be easily upgraded to the case of an arbitrary number of parameters and codims 2 and 3. Regards, Evgeni
Thank you very much for the comment, Will. I looked at your code and I have not found how I could use it to control the thickness of axes and tickmarks. Have I missed something? If so, could not you give me an example, please? Thanks again, Evgeni
I have got it, Alec, and I am deeply thankful for your invaluable help. Evgeni
Alec, here is an example of fit in your code: fit:=-1.15349559820136772*sin(6.31733026117843100*t-1.59937743196843218)+0.632900021230384108e-1*t^2+0.375929994701278206e-1*t-.119784615843290448; plot([`if`(fit>=0,fit,undefined),`if`(fit< 0,fit,undefined)],t=0..2,color=[red,blue]); Fit can be also a long piecewise function fitted to experimental data like this one copied and pasted from the LSSolve output (the minus sign is substituted with `< `): [[-.374122749037187119,` `,t=0.425224494625509708],[0.461103240716029206,` `,t=0.820482498682596706],[-.487906594187588028,` `,t=1.17583430812675526],[0.503703993961537533,` `,t=1.84141458338977282],[-.474312798381622158,` `,t=2.07643642721967892],[0.476619780954403438,` `,t=2.72771400858018609],[-.515049152510467456,` `,t=3.04258962007499001],[0.482156508938662298,` `,t=3.62966238621154691],[-.510419166905392241,` `,t=3.96891650719314226],[0.532900771914534110,` `,t=4.58094506098229282],[-.501757304940609550,` `,t=4.90951214779941836],[0.518180770062256490,` `,t=5.52701005492744635],[-.530099569478209909,` `,t=5.83250364265300991],[0.540629769765865187,` `,t=6.44116771591300185],[-.491960954417340613,` `,t=6.73823102585208211],[0.465372229604253230,` `,t=7.40040593094128774],[-.526930099177685962,` `,t=7.73028609364419417],[-.111278397610983224,` `,t=8.05654842673419758],[-1.272671408+2.113115942 t,` `,0.425224494625509708< =t and t< 0.820482498682596706],[2.652300641-2.670620523 t,` `,0.820482498682596706< t and t< 1.17583430812675526],[-2.239715945+1.489843713 t,` `,1.17583430812675526< t and t< 1.84141458338977282],[8.166542278-4.161386770 t,` `,1.84141458338977282< t and t< 2.07643642721967892],[-3.506124581+1.460103350 t,` `,2.07643642721967892< t and t< 2.72771400858018609],[9.067279545-3.149398997 t,` `,2.72771400858018609< t and t< 3.04258962007499001],[-5.683211892+1.698606577 t,` `,3.04258962007499001< t and t< 3.62966238621154691],[11.10167260-2.925758640 t,` `,3.62966238621154691< t and t< 3.96891650719314226],[-7.276197825+1.704691607 t,` `,3.96891650719314226< t and t< 4.58094506098229282],[14.95830123-3.149000974 t,` `,4.58094506098229282< t and t< 4.90951214779941836],[-8.610931946+1.651727177 t,` `,4.90951214779941836< t and t< 5.52701005492744635],[19.48373752-3.431431562 t,` `,5.52701005492744635< t and t< 5.83250364265300991],[-10.79032856+1.759146607 t,` `,5.83250364265300991< t and t< 6.44116771591300185],[22.93009966-3.475995484 t,` `,6.44116771591300185< t and t< 6.73823102585208211],[-10.23369553+1.445740660 t,` `,6.73823102585208211< t and t< 7.40040593094128774],[22.72630472-3.008069111 t,` `,7.40040593094128774< t and t< 7.73028609364419417],[-10.37516033+1.273980045 t,` `,7.73028609364419417< t and t< 8.05654842673419758]] Evgeni
Alec, that is precisely what I was doing before I asked gurus for help... I think the Maple team should be improving the graphics tools. Thank you very much, Evgeni
I see... What a strange discrimination! Why should I remember that such a simple function should be processed differently in 2D as opposed to 3D? I tried your recipe to my practical case. I wish to color the output of an evaluated output of LSSolve (fit) and failed. I used the following code: plot([`if`(fit>=0,fit,undefined),`if`(fit<0,fit,undefined)],t=0..7.93,color=[red,blue],thickness=2); Whatype defines fit as a function, so I thought naively it should work like sin(t)... Evgeni
Thank you very much, Alec, again. I thought one could avoid splitting the plot onto two subplots of different colors. Besides, the online documentation for 'color' assured that "c - color name, COLOR structure, procedure, or expression". Evgeni
Thank you very much, Alec. I thought there might exist a shorter way... Evgeni
Page 1 of 1