Get Help

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community
- :
- PTC Mathcad
- :
- PTC Mathcad
- :
- Summing function Wm(time,a,b,c,d) from m=0 to m=n ...

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-26-2014
03:35 AM

08-26-2014
03:35 AM

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 a_{m},b_{m},c_{m},d_{m} are coefficient valid for equation m

I need to do sum of W_{m} from m =0 to n: 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

Solved! Go to Solution.

Labels:

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-26-2014
08:47 AM

08-26-2014
08:47 AM

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

14 REPLIES 14

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-26-2014
03:57 AM

08-26-2014
03:57 AM

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-26-2014
03:57 AM

08-26-2014
03:57 AM

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!).

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-26-2014
04:25 AM

08-26-2014
04:25 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-26-2014
04:31 AM

08-26-2014
04:31 AM

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?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-26-2014
04:56 AM

08-26-2014
04:56 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-26-2014
05:03 AM

08-26-2014
05:03 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-26-2014
05:10 AM

08-26-2014
05:10 AM

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-26-2014
05:11 AM

08-26-2014
05:11 AM

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.

>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

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-26-2014
05:44 AM

08-26-2014
05:44 AM

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

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