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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

MathCad Prime 9.0 - Exporting data set Excel

DM_9987934
3-Newcomer

MathCad Prime 9.0 - Exporting data set Excel

Hi,

 

I'm trying to get a set of data in a form where I can copy and paste it into a another application. It is two columns of data. The first is a range variable. The second is a calculation on the range variable.

I've tried to get the two columns of data into an embedded Excel Component but just can't see how to do it. Getting confused between ranges versus vectors/matrices.

Is there a way of converting the range variable into a vector?

Any help would be much appreciated.

 

DM_9987934_0-1700586184892.png

 

I thought if you can see the indices, it is a vector/matrix?

 

Dave

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:Werner_E)

AH, I see the main problem now.

sigma.t is not a vector but a range variable! And so epsilon.t(sigma.t) is neither a range nor a vector - its an invalid object which can just be used for displaying the result but it can't be assigned to a variable nor can you access individual entries.

Its a pity that vectors and range look quite the very same in Prime.

 

Here I use a bold  and undocumented trick to turn a range into a vector by using an inline evaluation (the = at the end).

Werner_E_0-1700587826717.png

Don't  try to change Pa to Mpa - it will throw an error.

 

Now you have a vector s of data values which you can use for export or as an input to an Excel component.

When you feed this vector in your function epsilon.t you have to apply vectorization (the arrow over the expression)

Werner_E_1-1700587928382.png

 

View solution in original post

2 REPLIES 2
Werner_E
25-Diamond I
(To:DM_9987934)

In real Mathcad you could simply copy & paste the data from the Mathcad matrix to an Excel sheet, but copy & paste unfortunately is severely broken in Prime.

Why don't you try the WRITEEXCEL() function instead of the Excel component.

Or do you really need the data transferred to an embedded Excel sheet?

Werner_E
25-Diamond I
(To:Werner_E)

AH, I see the main problem now.

sigma.t is not a vector but a range variable! And so epsilon.t(sigma.t) is neither a range nor a vector - its an invalid object which can just be used for displaying the result but it can't be assigned to a variable nor can you access individual entries.

Its a pity that vectors and range look quite the very same in Prime.

 

Here I use a bold  and undocumented trick to turn a range into a vector by using an inline evaluation (the = at the end).

Werner_E_0-1700587826717.png

Don't  try to change Pa to Mpa - it will throw an error.

 

Now you have a vector s of data values which you can use for export or as an input to an Excel component.

When you feed this vector in your function epsilon.t you have to apply vectorization (the arrow over the expression)

Werner_E_1-1700587928382.png

 

Announcements

Top Tags