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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

How to export to excel file x-y point of a function?

sguercilena
1-Newbie

How to export to excel file x-y point of a function?

Hi,

I would like to export to an excel file the coordinate point Xa-Zd. Zd is function of Xa as you can see in attached. I need 1199 values of Zd in excel.

1 ACCEPTED SOLUTION

Accepted Solutions

Forgot to add .. you'll need to vectorize your function, because the derivative operator only acts on scalars (and it's always safer to do so as there might be other unintended vector operations that occur, such as dot product rather than element-by-element multiplication).

Stuart

View solution in original post

5 REPLIES 5

stefano guercilena wrote:

Hi,

I would like to export to an excel file the coordinate point Xa-Zd. Zd is function of Xa as you can see in attached. I need 1199 values of Zd in excel.

There is (I believe, because I don't have Prime on my current PC) a function WRITEEXCEL (or similar) that should do the job.  I think there is also an Excel data output block.  Look up Excel in Prime help.

Here's an example from an earlier Community question:

WriteXL_test.png

Stuart

Hi Stuart and thank you for your answer,

I already tried, the problem is that Zd(Xa) isn't a vector/array/matrix but an evaluation of a function!!  I think it's not possible in mathcad

stefano guercilena wrote:

Hi Stuart and thank you for your answer,

I already tried, the problem is that Zd(Xa) isn't a vector/array/matrix but an evaluation of a function!!  I think it's not possible in mathcad

Ah! The real problem is that X.a is a range variable, and WRITEEXCEL expects the data to be a matrix.   There are a couple of ways round this:

I usually use the vec(z) approach and the vec function is a permanent item in my Normal Template ... I think it works in Prime..

Stuart

Forgot to add .. you'll need to vectorize your function, because the derivative operator only acts on scalars (and it's always safer to do so as there might be other unintended vector operations that occur, such as dot product rather than element-by-element multiplication).

Stuart

Thank you Stuart for your time !!

Top Tags