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

Mathcad Prime 2 WRITEFILE function help requested

buckeyeman
Newbie

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

12 REPLIES 12

Re: Mathcad Prime 2 WRITEFILE function help requested

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

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.

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

Write_Excel_Nested.png

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

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?

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

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.

Re: Mathcad Prime 2 WRITEFILE function help requested

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

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.

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 :-(.

WriteReadXL.png

Re: Mathcad Prime 2 WRITEFILE function help requested

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

Regards,

Brad

Announcements
Check out the latest
Mathcad Tip
"PTC Mathcad 15 / Prime 1-6 Update."