Re: [Scilab-users] Fixed time step solver : Specify the time step

2014-07-23 Thread Quentin Mazué
Enclosed, a simple example of my problem. Integral_TimeStep.zcos Load the xcos scheme and launch simulation. ->The variable "In" will contain 1000 data with a sample time of 0.1s ->The variable "out" will contain 2001 data wi

Re: [Scilab-users] Scilab leastsq exponential fitting

2014-07-23 Thread Antoine Monmayrant
On 07/23/2014 01:36 PM, chloe.kykam wrote: I have added the dot to the division but I am still getting errors, !--error 21 Invalid index. at line 118 of function numderivative called by : at line 2 of function Dfun called by : at line 2 of function %opt called by : at line

Re: [Scilab-users] Scilab leastsq exponential fitting

2014-07-23 Thread chloe.kykam
I have added the dot to the division but I am still getting errors, !--error 21 Invalid index. at line 118 of function numderivative called by : at line 2 of function Dfun called by : at line 2 of function %opt called by : at line 92 of function leastsq called by : [

Re: [Scilab-users] Scilab leastsq exponential fitting

2014-07-23 Thread Stéphane Mottelet
Le 23/07/2014 11:45, chloe.kykam a écrit : k=6.63e-34*3e8/1.38e-23 x=[1;2;3;4;5;6;7;8;9;10] y=[280;320;369.22772;391.25743;414.74257;439.75248;466.06931;493.60396;523.87129;530] w=[0;0;1;1;1;1;1;1;1;0] function y=yth(x,a) y=a(1)*exp(-k/x/a(2)) endfunction a0=[1.0;1.0] function e=myfun(a,x

[Scilab-users] Scilab leastsq exponential fitting

2014-07-23 Thread chloe.kykam
I have 2 defined arrays x and y and would like to fit an exponential function to them with parameters a(1) and a(2). The test code is as follows: k=6.63e-34*3e8/1.38e-23 x=[1;2;3;4;5;6;7;8;9;10] y=[280;320;369.22772;391.25743;414.74257;439.75248;466.06931;493.60396;523.87129;530] w=[0;0;1;1;1

[Scilab-users] Fixed time step solver : Specify the time step

2014-07-23 Thread Quentin Mazué
Hi, I'm using a fixed time step solver : Runge-Kutta 4(5). I specified a time step in setup menu : Maximum step size = 0.1 (as explain in Scilab Help >> Xcos >> Solver >>Comparisons) In my diagram I have a 1/z block with an event clock input with a period of 0.1s My other blocks use the value o

Re: [Scilab-users] Find the position of vector in another vector

2014-07-23 Thread an.lld
thanks Serge Steer, the code does exactly what I wanted -- View this message in context: http://mailinglists.scilab.org/Find-the-position-of-vector-in-another-vector-tp4030943p4030946.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. _