Re: [Scilab-users] Converting string months to month numbers

2016-10-20 Thread Mike Page
Hi Jens, grep does something like what you want. -->[r,w]=grep(Ms,M); -->matrix(w,size(Ms)) ans = 12.4. 2. 12. 6. 7. Not sure why grep produces a vector when searching for a matrix, but it seems that way. HTH, Mike. On 20 October 2016 at 10:32, Jens Simon Strom wro

Re: [Scilab-users] Scilab control after an impossible calculation

2016-10-06 Thread Mike Page
Hi Paul, Would Scilab's try-catch block do what you want? For example: for i=1:10; try; disp(1/(i-5)); catch; disp("err"); end; end won't crash when it gets to the divide by zero. This is the more structured way, but you can use execstr with errcatch to do the same thing.

Re: [Scilab-users] Envelop of a noisy curve

2015-04-24 Thread Mike Page
Hi Paul, Usually the envelope is calculated via the magnitude of the Hilbert transform. Check out Hilbert in the help. As usual there are some caveats, but often this is close enough without further work. HTH, Mike. On 24 April 2015 at 13:05, wrote: > Dear All, > > I am absolutly not famili

Re: [Scilab-users] Pb to launch DotNetScilab C# example project

2015-04-15 Thread Mike Page
Hi Pascal, Not sure about DotNet, but some time ago I reported a problem with this API for C (not c#) because the third parameter is specified as int*, but is in fact int. If your compiler is fussy, this could be the problem. Try (NULL, NULL, 0). I found that fixed it for me. Hope that helps,

Re: [Scilab-users] [help] converting a simple C code to Scilab

2014-05-02 Thread Mike Page
Hi, vet = 1:4; disp (vet(3)); will do almost the same thing. But note that Scilab indices start at 1, not zero, so vet does not include the element vet[0] = 0; HTH, Mike. -Original Message- From: users [mailto:users-boun...@lists.scilab.org]On Behalf Of Alessandro Schmitt Sent: 02 May

Re: [Scilab-users] finding similar values with scilab

2014-02-21 Thread Mike Page
Hi, If you want to remove outliers from a data set, you can use the modified Thompson Tau method. Basically tau provides a limit based on mean and standard deviation so that values outside (mean +/- n * std dev) are rejected. The method is unfortunately iterative, but it works well. You can rem

Re: [Scilab-users] Help with text files

2013-11-26 Thread Mike Page
Hi Eduardo, Sometimes I have had problems like this due to line termination characters. It's possible if a file gets moved from Linux to Windows and back again, it can get unexpected CR or LF characters. Sometimes these are read as a garbage line. I would take a look at your text file with a hex

[Scilab-users] Levenberg-Marquardt algorithm

2013-09-18 Thread Mike Page
Hi, I have been using the Levenberg-Marquardt solver (lsqrsolve), but would like to look at ways to adjust it to better suit my particular problem. Does anyone know if the souce code for this is available anywhere and if it is in fact open source? Thanks, Mike. -- View this message in contex

Re: [Scilab-users] Colorbar_same color code, different graphs

2013-07-22 Thread Mike Page
anybody help me please? It would be great thank you in advance and kind regards, Larissa Gesendet: Dienstag, 16. Juli 2013 um 11:09 Uhr Von: "Mike Page" An: "International users mailing list for Scilab." Betreff: Re: [Scilab-users] Colorbar_same color code, differe

Re: [Scilab-users] Colorbar_same color code, different graphs

2013-07-16 Thread Mike Page
Hi Larissa, I'm no expert on this, but have you tried changing the data_bounds for the figure's children independently? I think if you just set the colorbar limits with colorbar(a,b), that only changes the legend on the bar itself. Try f=gcf(); then look at f.children(1),data_bounds or f.chil

Re: [Scilab-users] Convert x, y, z data into a z=f(x,y) function

2013-07-01 Thread Mike Page
Hi, You are asking a question which in general has no answer. There are an infinite number of models which can fit your data. You need to find some possible candidate model forms based on physical properties and then try fitting to them. You are probably looking for a fit which leaves residu

Re: [Scilab-users] non access to sci files

2013-04-12 Thread Mike Page
Hi, I tried Sci2C once (a while ago now), but I found it had too many limitations. For me the lack of support for hypermatrices was enough to make it not usable. There is (I think) an example of Sci2C that shows how it works, but I don't remember where - sorry. One other way to solve your probl

Re: [Scilab-users] discrete Fourier transform

2013-03-21 Thread Mike Page
Hi, I think this is just a question of scaling. There is no "correct" scaling for the FFT - just some different conventions. This is explained here (http://www.mathworks.co.uk/matlabcentral/answers/15770-scaling-the-fft-and- the-ifft). The "correct" answer with Scilab would be exactly 100 (N/2)

Re: [Scilab-users] Error in Nelder-Mead functions

2013-03-13 Thread Mike Page
I have just checked on Scilab 5.3.2 and found this works on that version, so it looks like a bug. Mike. -Original Message- From: users-boun...@lists.scilab.org [mailto:users-boun...@lists.scilab.org]On Behalf Of Mike Page Sent: 13 March 2013 13:52 To: users@lists.scilab.org Subject

[Scilab-users] Error in Nelder-Mead functions

2013-03-13 Thread Mike Page
Hi, I am trying to use the Nelder Mead optimisation functions to fit a biological model to some experimental data. I am using Scilab 5.4.0 on Win XP. The search halts with the error: !--error 21 Invalid index. at line 78 of function neldermead_updatesimp called by : at line 26 of fun

Re: [Scilab-users] Emulate Object Oriented Programming

2012-11-27 Thread Mike Page
You could of course "define constants" in Scilab. This is what I usually do: [NONE, CONTINUOUS, DISCRETE, FFT] = (1, 2, 3, 4); OK - not perfect, but it makes code more readable. HTH, Mike. -Original Message- From: users-boun...@lists.scilab.org [mailto:users-boun...@lists.scil

Re: [Scilab-users] LInear interpolation between 2 curves

2012-09-17 Thread Mike Page
Hi Paul, Assuming the relationship between x, y and T is approximately linear, then you can just match the points on the curves pairwise and interpolate between the pairs using interpln. If your target temperature T is such that T = aT1 + (1-a)T2, then it will produce a point at abscissa x = ax1