Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: sum of exponentials
Replies: 9   Last Post: Nov 24, 2012 7:16 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
dwi

Posts: 17
Registered: 10/18/12
sum of exponentials
Posted: Nov 22, 2012 7:47 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I have a matrix whose data are interrupted by sequences of zeros. I need every time that there's a zero value to substitute it with a sum of exponentials using the previous data, eg:
x=[x1 x2 x3 0 0 0 x7 0 0]
When i find the first zero in the element x4 I want:
x4=(x3*e^(-1)+x2*e^(-2)+x1*e^(-3))/(e^(-1)+e^(-2)+e^(-3));
However, when I find the second zero value I need to calculate the same expression but without using the previous recalculated values. That is,
x4=x5=x6
and for x8 I will use only the values in x7,x3,x2,x1 and then x8=x9 etc
And all this for a 180000-length data.
Any ideas on how to do this?
Thanks in advance



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.