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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Automating Single Carrier Interference Calculations

BillDumke
1-Newbie

Automating Single Carrier Interference Calculations

I have frequency domain data in a single row array A of length 100,000. I want to add interference at the first frequency, calculate and store results, then increment the position of the interference, calculate and store results, and then repeat this for all 100,000 frequencies. How do I set this up in Mathcad 15?

The complexity of the calculations would be too difficult for a program, and trying to create a diagonal matrix with 100,000 rows and columns is a bit too much for Mathcad 15. Get "out of memory" errors trying to do that.

See attached Mathcad 15 file.

Bill

26 REPLIES 26
MikeArmstrong
5-Regular Member
(To:BillDumke)

Bill Dumke wrote:

I have frequency domain data in a single row array A of length 100,000. I want to add interference at the first frequency, calculate and store results, then increment the position of the interference, calculate and store results, and then repeat this for all 100,000 frequencies. How do I set this up in Mathcad 15?

The complexity of the calculations would be too difficult for a program, and trying to create a diagonal matrix with 100,000 rows and columns is a bit too much for Mathcad 15. Get "out of memory" errors trying to do that.

See attached Mathcad 15 file.

Bill

Bill,

Will the value of "A" change for each index?

Mike

No, the value of A will be the same each time.

Bill

RichardJ
19-Tanzanite
(To:BillDumke)

You want to write out 100,000 files? Are you sure? That will take a horrendously long time. Then what do you intend to do with them afterwards, because reading them back in to any piece of software will take a horrendously long time too?

No I would just append the error results (just a few variables to a file. I think Mathcad 15 could handle a few entries augmented into a row for 100,000 listings, although I am sure it would take a very long time to do it.

Bill

MikeArmstrong
5-Regular Member
(To:BillDumke)

Bill,

Is the attached image of any help? Each column of data can be selected at will.

Mike

Mike,

Thanks for the help. I tried it and it does work up to a 1000 points but somewhere between 1000 points and 10,000 points it gets out of memory errors. See attached Mathcad file. Diag works just as well.

Bill

Mike,

Whoops, for some reason my attachment did not get there. Hopefully this time it will. This web site is strange. It shows two entries for the same attachment even though I only added one file.

Thanks for the help. I tried it and it does work up to a 1000 points but somewhere between 1000 points and 10,000 points it gets out of memory errors. See attached Mathcad file. Diag works just as well.

Bill

MikeArmstrong
5-Regular Member
(To:BillDumke)

Bill Dumke wrote:

Mike,

Whoops, for some reason my attachment did not get there. Hopefully this time it will. This web site is strange. It shows two entries for the same attachment even though I only added one file.

Thanks for the help. I tried it and it does work up to a 1000 points but somewhere between 1000 points and 10,000 points it gets out of memory errors. See attached Mathcad file. Diag works just as well.

Bill

Bill,

I have just tried both methods and they seem to work for 2500 points. Could you not break the calculation into four parts?

0 - 2500 2500 - 5000.... ect.

Mike

You have a fair description but incoherent. Incoherent about your "Diagonal matrix". If you have a vector of values and want to follow how it would respond to a travelling impurity [ a tracer], how does that dictate a diagonal matrix in your mind. It looks possible to use the rotate function to either move the vector around a tracer in fixed position or vice versa, circulate the tracer in the vector and then follow the tracer and collect the ccfft. From each experiment, augment the array so you don't have to bother for a 100,000 square matrix.

Jean,

I think you have a very good point. I was just thinking of using each row of a diagonal matrix, but you are correct I don't need all of the rows at once only one, and it appears impossible for Mathcad 15 to handle that size of a matrix anyway.

I didn't know there was a "rotate" function. I can't find it in the Mathcad 15 Help menu. I did do something like this a while back using a "shift(array, index)" function I created from something I cobbled from the Internet. It worked, but I had to do it manually. I only had to do 45 shifts so it was reasonable to do manually.

You are right there is a "rotate function". I just typed it in, but it does not seem to work right, just guessing at how to use it. Can you give me some info on it?

Bill

Bill,

Here is, both ways ! slide the data set or slide the marker.

You can have the two ways simultaneously.

I'm Mathcad 11 [for any of your transmission].

It looks programmable, try it. At least it will

help about a reasonable size it can calculate.

Eventually, the marker could have any shape

The function "replace(,,,,)" would do too.

Jean

Jean,

Thank you for the Mathcad 11 file and the help. I tried it at U of 100,000 rows. But it was still calculating about 7 or 8 minutes later so I stopped it with Esc. It is way too slow. (I misunderstood and thought you were talking about the Mathcad "rotate" function.)

I am sorry, I know now you couldn't see my original post, but I did that a lot easier and faster. All I have to do is to change the index each time I recalculate, but I have to do it manually. I attached the file in Mathcad 11 format so you can see what I am trying to do.

I want to have the index change automatically, everything is recalculated, the error result is stored and then the index is incremented again. I was hoping to not have to do it with a program, since the calculations are going to be quite long.

I am getting a funny feeling that to do what I need to do I will have to put that huge amount of calculations into a single program, it is not just a cfft. (Actually that should be an icfft since I am working in the frequency domain with the tracer as you call it.) But after I add the interference signal to the transmitted signal and take the ICFFT then I have to do a lot of calculations to get it back to the digital format I need to calculate the errors from that of the original transmitted data.

Am I correct that I need a program to increment an index automatically? I suspect it is. Maybe I can call the other functions from within a program that does the incrementing of the index.

Thanks again for the help.

Bill

Jean,

Whoops. Here is my original file in Mathcad 11 format. I forgot to add it to the previous post.

Bill

The attached creates a single text file using APPENDPRN. I haven't tried it with 100000 columns though!

Alan

MikeArmstrong
5-Regular Member
(To:BillDumke)

Bill Dumke wrote:

Am I correct that I need a program to increment an index automatically? I suspect it is. Maybe I can call the other functions from within a program that does the incrementing of the index.

Thanks again for the help.

Bill

You can just create a vector and increment through your index values that way, but I'm pretty sure you'll have to create a program of some sort.

Mike

It appears most of this thread has been deleted. I believe now you are correct in that a range variable on a vector is the best way to go, although I haven't been able to get it to work. Attached is a copy of what I have been working on. One problem I have been having using a range variable for the indexx number in the blue highlighted "Add Single Carrier Interference" section is that both range variable places have been used up defining the Interference at a given indexx to be a certain number for an array, row = 0.

If I use a program, I suspect it will be too much of a mess getting all the functions that are used into the program.

Thanks for your help.

Bill

RichardJ
19-Tanzanite
(To:BillDumke)

It appears most of this thread has been deleted.

Yes, it would seem so. I think someone deleted their post(s) and when they did so they decided to delete everyone else's at the same time. If that's the case then it's not very nice behavior!

"I think someone deleted their post(s) and when they did so they decided to delete everyone else's at the same time"

I'm puzzled! Personally, I've not deleted any of my posts, but the implication of your words is that one can choose to delete someone else's posts. Is that right, or is there an automatic chain-delete built in to the system?

Alan

MikeArmstrong
5-Regular Member
(To:AlanStevens)

Alan Stevens wrote:

I'm puzzled! Personally, I've not deleted any of my posts, but the implication of your words is that one can choose to delete someone else's posts. Is that right, or is there an automatic chain-delete built in to the system?

Alan

Alan,

Have you not seen the "Chain Delete Bug" thread created by Jean?

http://communities.ptc.com/message/150718#150718

Jean was the first to come across this problem a couple of weeks back and decided to make a thread about it, but PTC don't seem to have done anything about it.

Hear is the link to his second thread about the bug.

http://communities.ptc.com/message/151452#151452

Mike,

I had noticed the other thread, but I'd assumed the chain-deletion was automatic - i.e. built-in to the system. Richard's words suggested the possibility of choosing to delete someone else's posts.

Alan

MikeArmstrong
5-Regular Member
(To:AlanStevens)

If you click delete on one of yours posts you get the following options.

Delete the message " Re: Automating Single Carrier Interference Calculations " and all its replies ( 1 ).
Delete only this message but keep its replies ( 1 ). All replies will become replies of the parent message ( Re: Automating Single Carrier Interference Calculations ).
Basically, if someone decides to select the first option the thread can become useless.
Mike
RichardJ
19-Tanzanite
(To:AlanStevens)

I think we should stop referring to this as a bug, because it's not one. It's a feature, just an extremely undesirable one that is wide open to abuse. If you delete your post you get this dialogue:

Chain delete OPTION.gif

So it's up to the user to decide whether or not they will delete everyone else's posts. It's not automatic. (Although it is the default option - an undesirable feature of an undesirable feature!)

RichardJ
19-Tanzanite
(To:RichardJ)

Great. It's a really undesirable feature, with a really undesirable default option, and what appears to be a REALLY UNDESIRABLE BUG! If I choose to delete only my post, but keep the replies, I get this:

The real chain delete bug.gif

I tried this multiple times, so it's not just a one time hang up of the forum.

I can delete the post and all the replies with no problem though.

Wonderful!

MikeArmstrong
5-Regular Member
(To:RichardJ)

There we have it then. If one wants to remove their oen post they have to remove all corresponding posts.

Mike

"...an undesirable feature of an undesirable feature!" - too right!!

Alan

Don't worry Alan,

This web site is like giving an old wolf : a Jeep [not enough petrol] + a map [ the wrong map] + a compass [broken] ... +++. So, the Jeep can't cross the river, the map didn't show the river and the magpie toke the brilliant compass [it was broken anyway !]. Can you explain to a kid that: your message, Mike's message, any collab message is not coded and paired with a true/false delete keystroke, so that any collab can delete any of his message ? This "facebook" is so messy that by natural virtue any collab may want to remove superfluous message(s) to keep it minimized and clean. "Not answered", "Possibly answered", "Answered" ... Thanks Nannycare ! Nanny, do I throw the cheques as well as the bills ? Oh ! let me see the directives of the vacuum cleaner.

Dan has a solution: solve the "Cannonball" project.

Jean

Top Tags