cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Summing function Wm(time,a,b,c,d) from m=0 to m=n ?

SOLVED
Highlighted
JXB
Alexandrite

Summing function Wm(time,a,b,c,d) from m=0 to m=n ?

To all,

I am sure I saw something about how to do such thing but I cannot find it so needs some pointers

I have a function (see attached mcad sheet) Wm(t,am,bm,cm,dm) where t is time and am,bm,cm,dm are coefficient valid for equation m

I need to do sum of Wm from m =0 to n: Capture.PNG but I am struggling with indices in mcad

Coudl anyone refreshe my memory on this summation? It might be something with "dicretizing" the time 't' if I recall

Thanks

Regards

JXB

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Summing function Wm(time,a,b,c,d) from m=0 to m=n ?

Thanks to all for the help. Moving on to the next bit of the tool....

View solution in original post

14 REPLIES 14

Re: Summing function Wm(time,a,b,c,d) from m=0 to m=n ?

Like the attached?

I have change t from a range variable to a vector and also removed the units s the program works.

Re: Summing function Wm(time,a,b,c,d) from m=0 to m=n ?

The attached should help.

Alan

Looks like Mike just beat me to it!

Edit: Just noticed that your original file was a .mcd, so I've added a .mcd version here.

Mike: In your file the definition of Wm still contains tdm < t > tdm+Nm/2fm. I suspect this should be tdm < t < tdm+Nm/2fm (though I could be wrong!).

Re: Summing function Wm(time,a,b,c,d) from m=0 to m=n ?

Hi Alan

Thanks for the help. Am I correct to say that the Sum only works for a specific t value and not a range of t. Using Mike suggested method, I reckon that one needs to use two range variables

i for the vectorised time t

m for the number of coefficient (a,b,c,d) to consider

Re: Summing function Wm(time,a,b,c,d) from m=0 to m=n ?

AlanStevens wrote:

The attached should help.

Alan

Looks like Mike just beat me to it!

Edit: Just noticed that your original file was a .mcd, so I've added a .mcd version here.

Mike: In your file the definition of Wm still contains tdm < t > tdm+Nm/2fm. I suspect this should be tdm < t < tdm+Nm/2fm (though I could be wrong!).

Hi Alan,

I was a little unsure on this myself, but the tdm condition ' < t > tdm+Nm/2fm ' does return a few 'True' evaluations so I left it as it is. JXB can you clarify?

Re: Summing function Wm(time,a,b,c,d) from m=0 to m=n ?

J B wrote:

Hi Alan

Thanks for the help. Am I correct to say that the Sum only works for a specific t value and not a range of t. Using Mike suggested method, I reckon that one needs to use two range variables

i for the vectorised time t

m for the number of coefficient (a,b,c,d) to consider

The sum as written only works for a specific value of t, but you could include this sum within another that summed over the values of t.

Alan

Re: Summing function Wm(time,a,b,c,d) from m=0 to m=n ?

Mike Armstrong wrote:

AlanStevens wrote:

The attached should help.

Alan

Looks like Mike just beat me to it!

Edit: Just noticed that your original file was a .mcd, so I've added a .mcd version here.

Mike: In your file the definition of Wm still contains tdm < t > tdm+Nm/2fm. I suspect this should be tdm < t < tdm+Nm/2fm (though I could be wrong!).

Hi Alan,

I was a little unsure on this myself, but the tdm condition ' < t > tdm+Nm/2fm ' does return a few 'True' evaluations so I left it as it is. JXB can you clarify?

It will evaluate to "true" only when t is greater than the larger of the two conditions.

Alan

Re: Summing function Wm(time,a,b,c,d) from m=0 to m=n ?

Am I correct to say that the Sum only works for a specific t value and not a range of t.

It depends on what you are hunting for. As I suppose from the inserted pic you want to define a function for the second derivative of x like shown below, but I may be wrong.

And of course you may "sum" over t by using an integral.

But to be honest its unclear to me what you are really after.

1.png

Re: Summing function Wm(time,a,b,c,d) from m=0 to m=n ?

AlanStevens wrote:

Mike Armstrong wrote:

AlanStevens wrote:

The attached should help.

Alan

Looks like Mike just beat me to it!

Edit: Just noticed that your original file was a .mcd, so I've added a .mcd version here.

Mike: In your file the definition of Wm still contains tdm < t > tdm+Nm/2fm. I suspect this should be tdm < t < tdm+Nm/2fm (though I could be wrong!).

Hi Alan,

I was a little unsure on this myself, but the tdm condition ' < t > tdm+Nm/2fm ' does return a few 'True' evaluations so I left it as it is. JXB can you clarify?

It will evaluate to "true" only when t is greater than the larger of the two conditions.

Alan

Agree.

Which is does from row 951 onwards

Clipboard01.jpg

I think the way you have it is the correct way, but confirmation by JXB would be beneficial.

Re: Summing function Wm(time,a,b,c,d) from m=0 to m=n ?

Capture2.PNG

Clarification for < t > statment. I changed to an OR statment. Will attahced a ver2 of the mcad sheet soon

Announcements