The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum
 Origin Forum
 convolution

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
modelocking Posted - 04/29/2007 : 11:17:45 AM
Origin Version (Select Help-->About Origin):7.0
Operating System:Win XP

Hi guys!
I need to fit experimental data with a convolution of gaussian and exponential decay. I tried to follow instrunction found in this forum and wrote what fallows:


static double Bstore, Cstore;
//static property retains the parameter values over iterations
BOOL bErr;
Dataset dsX("Data1_A");
Dataset dsE("Data1_E");
Dataset dsInteg("Data1_F");
if(B!=Bstore || C!=Cstore) { //parameter checking
dsE = (C*(exp(-0.5*((dsX-15)/4)^2))*exp((-x+dsX)/B)); //vector notation
Curve W( "Data1_A", "Data1_E" );
IntegrationResult ir;
bErr = Curve_integrate(&W, &ir, NULL, &dsInteg, TRUE );
// Perform integration
Bstore=B; Cstore=C
}
y = Data_table(x, &dsInteg, &dsX);

This function compiles succesfully, but curve fitting doesn't work!
Any good idea?
Thanks

Edited by - modelocking on 04/29/2007 12:38:37 PM
6   L A T E S T    R E P L I E S    (Newest First)
modelocking Posted - 04/30/2007 : 1:06:51 PM
Thanks Mike but you're wrong.
When "compile before use" is checked both Y-Script and Equation are interpreted in Origin C......I read it on the help...
Anyway.... I made a little algebra on the convolution, added a new data column for the integration variable and now it seems to work well...
I will let you Know.
Thank a lot everybody!!!!
Mike Buess Posted - 04/30/2007 : 09:21:14 AM
quote:
I'm working on Y-Script.
I'm pretty sure you should use Equations when you fit with OriginC. In fact, you don't even see that option unless the Use Origin C option is unchecked. Select Form = Equations and then check the Use Origin C option.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 04/30/2007 09:26:30 AM
Deanna Posted - 04/30/2007 : 04:22:42 AM
My data is in Column A and B of the Data1 workbook. And the example works fine for me.

Deanna
OriginLab Technical Services
larry_lan Posted - 04/30/2007 : 04:11:35 AM
Maybe you can provide your data and initial values to tech@originlab.com ?

Larry
OriginLab Technical Services

Edited by - larry_lan on 04/30/2007 04:12:01 AM
modelocking Posted - 04/30/2007 : 02:58:16 AM
Yes, I wrote the function fallowing that example.
I don't think the problem is parameters initialization: C and B have physical meanings, so I know their values a priori. Anyway I try to initialize with many several values, but it always appears the message that the function is not generating values.I'm working on Y-Script.
Maybe the problem is that independent variable x and integrating variable dsX works on the same data column?
Thanks
Deanna Posted - 04/29/2007 : 10:32:36 PM
Did you mean this article in our k-base?
http://www.originlab.com/www/support/resultstech.aspx?ID=121&language=English&Version=7.5

You mentioned that "curve fitting doesn't work". Is it because of improper initial parameter values (note that you have to enter initial values by yourself)? Could you please provide us more details on how the curve fitting "doesn't work"?

Deanna
OriginLab Technical Services

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000