Hello all,
first of all, thanks a lot for your effort. I must say that I don't really have anyone to run to for asking about mathematical models - I could go to the mathematicians at the University, but I don't know anyone there and I barelly know where the institute is located...
therefore I decided to insert my simplest table in here (it is actually very simple) - may be someone here knows which kind of mathematical model I could use?
I have been searching for it in literature, but I don't seem to be in the right path...
So attached you will find my data table as well as the scilab commands I used to create the respective graph. I mean, my data is already interpolated...shouldn't it be easy to get a function (z,x,y) out of it?
I would be very very thankful for any help...I'm getting a bit desperate...
best regards,
Larissa
Gesendet: Dienstag, 25. Juni 2013 um 11:09 Uhr
Von: "CRETE Denis" <denis.cr...@thalesgroup.com>
An: "International users mailing list for Scilab." <users@lists.scilab.org>
Betreff: Re: [Scilab-users] Convert x, y, z data into a z=f(x,y) function
Von: "CRETE Denis" <denis.cr...@thalesgroup.com>
An: "International users mailing list for Scilab." <users@lists.scilab.org>
Betreff: Re: [Scilab-users] Convert x, y, z data into a z=f(x,y) function
Hello,
The general procedure for fitting data in the case of 2 variables is the following:
// First define your mathematical model by changing the following line
deff('z=MyFunction(x,y)', 'z=p(1)*x + p(2)*y + p(3)*x.*y');
// Store all experimental data in a single array ExD; X, Y, Z assumed to be 1 x NZ vectors
ExD=[X;Y;Z];
// Define the error function (to be minimized with respect to the parameters p)
deff('erro=G(p,ExD)','x=ExD(1),y=ExD(2), z=ExD(3), erro=z-MyFunction(x,y)')
// Fit experimental data contained in W
// The column vector p0 is an initial guess of the values for the parameters of your Model
[p,err]=datafit(G,ExD,p0)
// you can check values generated with
MyFunction(X,Y)
HTH
Denis
-----Message d'origine-----
De : users-boun...@lists.scilab.org [mailto:users-boun...@lists.scilab.org] De la part de Dang, Christophe
Envoyé : mardi 25 juin 2013 10:20
À : International users mailing list for Scilab.
Objet : Re: [Scilab-users] Convert x, y, z data into a z=f(x,y) function
Hello,
De la part de Larissa
Envoyé : mardi 25 juin 2013 09:52
> I conducted an experiment and thus my results are composed of x,y,z
> data,
[...]
> but I can't figure out how to get an equation "z=f(x,y)" out of it.
This is more a math problem than a Scilab problem.
You must have a mathematical model, i.e. a parametric formula, then you can adjust the parameters by regression (or maximum likehood).
You may have theoretical models that derive from elementary assumptions
-- you usually find such model in the bibliography --, or use a "nice model that fit the global shape"
-- you may ask the math laboratory in your neighbourhood, this is usually polynomials, exponentials, statistical laws...
So if you come to us with a parametric model, we will be able to help you.
best regards.
--
Christophe Dang Ngoc Chan
Mechanical calculation engineer
______________________________________________________________________
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
______________________________________________________________________
_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users
_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users
The general procedure for fitting data in the case of 2 variables is the following:
// First define your mathematical model by changing the following line
deff('z=MyFunction(x,y)', 'z=p(1)*x + p(2)*y + p(3)*x.*y');
// Store all experimental data in a single array ExD; X, Y, Z assumed to be 1 x NZ vectors
ExD=[X;Y;Z];
// Define the error function (to be minimized with respect to the parameters p)
deff('erro=G(p,ExD)','x=ExD(1),y=ExD(2), z=ExD(3), erro=z-MyFunction(x,y)')
// Fit experimental data contained in W
// The column vector p0 is an initial guess of the values for the parameters of your Model
[p,err]=datafit(G,ExD,p0)
// you can check values generated with
MyFunction(X,Y)
HTH
Denis
-----Message d'origine-----
De : users-boun...@lists.scilab.org [mailto:users-boun...@lists.scilab.org] De la part de Dang, Christophe
Envoyé : mardi 25 juin 2013 10:20
À : International users mailing list for Scilab.
Objet : Re: [Scilab-users] Convert x, y, z data into a z=f(x,y) function
Hello,
De la part de Larissa
Envoyé : mardi 25 juin 2013 09:52
> I conducted an experiment and thus my results are composed of x,y,z
> data,
[...]
> but I can't figure out how to get an equation "z=f(x,y)" out of it.
This is more a math problem than a Scilab problem.
You must have a mathematical model, i.e. a parametric formula, then you can adjust the parameters by regression (or maximum likehood).
You may have theoretical models that derive from elementary assumptions
-- you usually find such model in the bibliography --, or use a "nice model that fit the global shape"
-- you may ask the math laboratory in your neighbourhood, this is usually polynomials, exponentials, statistical laws...
So if you come to us with a parametric model, we will be able to help you.
best regards.
--
Christophe Dang Ngoc Chan
Mechanical calculation engineer
______________________________________________________________________
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
______________________________________________________________________
_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users
_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users
[fd,SST,Sheetnames,Sheetpos] = xls_open('C:\test1.xls') Sheets = readxls('C:\test1.xls')
typeof(Sheets) s1=Sheets(1) data=s1.value; y=data(1,2:11); //LI x=data(2:11,1); //time z=data(2:11,2:11); xx = linspace(0,25, 40); yy = linspace(0,1030, 40); [xp,yp] = ndgrid(xx,yy); zp = linear_interpn(xp,yp, x, y, z); zm = min(zp) zM = max(zp) clf() plot3d(xx,yy,zp) xlabel("time [d]", "fontsize", 2); ylabel("Light Intensity [µmolm-2s-1]") zlabel("Biomass [g/m²]"); set(gca(),"grid",[1 1 1]); f=get("current_figure"); f.color_map=jetcolormap(64); h=get("hdl") h.color_flag=1 colorbar(zm,zM)
test1.xls
Description: MS-Excel spreadsheet
_______________________________________________ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users