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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Exporting Mathcad data

bmulyanto
6-Contributor

Exporting Mathcad data

Hi,

 

I have been working on this equation and the worksheet works.

Now I want to export rho_ms(w) and w to make a plot and be compared with the result from other program.

image.png

 

 

I have read about the vectorization process like in this https://community.ptc.com/t5/PTC-Mathcad/exporting-the-vector-of-f-x-y-function-into-matrix-or-table/m-p/569400

and follow one of the uploaded file.

But I have this labeling issue.

image.png

What I understand about this vectorization is we need to change our range variable into an indexed variable.

what label should I put for that index i?
if I use w(i), it is ok, but it comes back to a case of range variable, doesn't it?

I tried with auto and variable, but still have error while one uploaded worksheet in the link above use auto and works.

maybe i missunderstand something here.

I attached the worksheet.
I appreciate the help.

 

6 REPLIES 6

When you type w(i)  {or with a subscripted index, w[i} you are creating a vector variable w.  This is different than your original range variable w, so be careful.  If you then vectorize your equations A(w), Deff(w), and so on the results of those calculations will be vectors (the same length as the vector w), and you can write those to a file.  

 

The augment function will arrange vectors side by side into a single array for handling.

I tried to use w(i) and put it in the excel component.
still have this error..

image.png

B.png

See if the attached file (P5 format) helps

Addendum:

If your goal is just to export a few data columns, you may consider doing it without the slow Excel component and simply use the WRITEEXCEL command:

B.png

bmulyanto
6-Contributor
(To:Werner_E)

hi, 

 

what label do you use for i?

I use variable as it label, use i as index or as argument in w(i), all still have error.

image.png

thanks for the worksheet.

I use prime4 though, so cannot open the newer version file.


@bmulyanto wrote:

hi, 

 

what label do you use for i?

I use variable as it label, use i as index or as argument in w(i), all still have error.

image.png

thanks for the worksheet.

I use prime4 though, so cannot open the newer version file.


Look at the comment in the picture I posted here: https://community.ptc.com/t5/PTC-Mathcad/Exporting-Mathcad-data/m-p/594296/highlight/true#M184691

 

You have to type a multiplication sign (*) after the "i" and the "(".

Otherwise Prime assumes you are using a function "i(..)" which is not defined.

 

As the value of (11-10) is 1 you may just type w:=10 + i

 

File in Format P4 attached

Top Tags