Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
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.
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.
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.
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..
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:
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.
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.
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