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
- :
- Mathcad Prime 2 WRITEFILE function help requested

Options

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

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

Showing results for

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

11-23-2013
03:28 PM

11-23-2013
03:28 PM

Mathcad Prime 2 WRITEFILE function help requested

Hi,

I need to able send this 1-row by 4-array-column nested array to the non-existent Excel file Test1_23NOV2013.xlsx in the working directory. How do I do this? I find the Prime 2 help file to be less than helpful, thanks.

[ [95.7] [7637] [14972] [64.7] ]

Regards,

Brad

Labels:

12 REPLIES 12

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

11-23-2013
06:57 PM

11-23-2013
06:57 PM

Re: Mathcad Prime 2 WRITEFILE function help requested

Lookup up the command WRITEEXCEL() in the help.

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

11-23-2013
10:56 PM

11-23-2013
10:56 PM

Re: Mathcad Prime 2 WRITEFILE function help requested

What exactly are you trying to achieve? Excel does not understand nested arrays, and WRITEEXCEL refuses to do so.

TTFN

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

11-24-2013
06:53 AM

11-24-2013
06:53 AM

Re: Mathcad Prime 2 WRITEFILE function help requested

nested arrays

Ooops, I missed that.

Of course you would first have to create a structure compatible with Excel and you would have to decide how you would like your data be presented in Excel.

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

11-24-2013
10:01 AM

11-24-2013
10:01 AM

Re: Mathcad Prime 2 WRITEFILE function help requested

Look if the attached would help.

For more help I think you will have to post the worksheet with the real data you want to write.

Maybe this thread could be of interest to you, too: http://communities.ptc.com/message/211499#211499

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

11-25-2013
10:42 AM

11-25-2013
10:42 AM

Re: Mathcad Prime 2 WRITEFILE function help requested

Thanks for the suggestions, I'll look at them. My nested array can vary in the number of rows, depending on the case study, I figured if someone could show me how to send one row to Excel, I could then manage from there on.

I cannot post the worksheet due to potential ITAR limitations.

My program will not run in v15 due to the 32-bit limitations, runs fine (albeit though SLOWLY) in Prime 2. But, I need a clean way to port my data results from Prime 2 back to v15. v15 then allows me to generate 2-vertical axis plots, and it also permits a no-fuss copy and paste of the plots into Word.

Regards,

Brad

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

11-25-2013
02:47 PM

11-25-2013
02:47 PM

Re: Mathcad Prime 2 WRITEFILE function help requested

If the elements of data can be different sized vectors and matrices, you would have to keep track of the dimensions of those matrices and write those in the file as well to be able to extract them correct later with MC 15.

It shoudn't be difficult to write a small routine doing this as long as data itself is a column vector simply "holding together" the various data structure.

If data can have more than one column it would be a bit more work but still not that diffucult. At least the elements of data itself should not be nested arrays, otherwise it would really get more complicated to restore the data correctly.

The point is in any case that you cannot write nested matrices to an excel file.

But then, for the purpose you need it you won't be forced to an excel file as output, right?

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

11-25-2013
06:00 PM

11-25-2013
06:00 PM

Re: Mathcad Prime 2 WRITEFILE function help requested

Also, I am having to resort to editing my program in v15 then converting it to back over to Prime 2, simply because editing the program in Prime 2 is WORSE than using a TSO terminal on a 75-baud dial-up line on a busy mainframe - the S L O W response just about makes me want to scream!

Regards,

Brad

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

11-25-2013
06:47 PM

11-25-2013
06:47 PM

Re: Mathcad Prime 2 WRITEFILE function help requested

editing the program in Prime 2 is WORSE than using a TSO terminal on a 75-baud dial-up line on a busy mainframe - the S L O W response just about makes me want to scream!

I think you are being unfair. Compared to a DEC 10, Prime is probably a little faster.

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

11-26-2013
08:52 AM

11-26-2013
08:52 AM

Re: Mathcad Prime 2 WRITEFILE function help requested

I used to work on a DEC PDP-1145 back in the day

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

11-25-2013
06:52 PM

11-25-2013
06:52 PM

Re: Mathcad Prime 2 WRITEFILE function help requested

editing the program in Prime 2 is WORSE than using a TSO terminal on a 75-baud dial-up line on a busy mainframe - the S L O W response just about makes me want to scream!

Fully agreed! I know exactly what you are talking about. Interestingly enough, even as many people here complain about Prime (especially in comparison with MC15), most of them crizicize missing functionality and features but few criticize the slow response of the UI and the bad visability of the lightgrey "highlighting" which replaces the horicontal "cursorline". Editing is very often a matter of trial and error for me.

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

11-25-2013
08:09 PM

11-25-2013
08:09 PM

Re: Mathcad Prime 2 WRITEFILE function help requested

In case you still are in need for routines to do the data exchange between Prime and MC you described, here are two routines, WriteXL() and ReadXL(), which will work on nested arrays (nest level 1 only).

It was written in Mathcad 15 for the very same reasons you described. I guess you can convert it in Prime format yourself. While Prime2 and Prime3 can coexist, the installation of Prime3 killed the Prime2 converter which doesn't work anymore. So I could only convert it in Prime3 format and there is no way to convert it back in P2 format. Its a PTC software :-(.

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

11-26-2013
08:53 AM

11-26-2013
08:53 AM

Re: Mathcad Prime 2 WRITEFILE function help requested

Thaks for your help, Werner, you've been a terrific help!

Regards,

Brad