Skip to main content
6-Contributor
February 27, 2024
Solved

how to extract the all values of Sol Data of differential equations in Mathcad to Excel or CSV files

  • February 27, 2024
  • 3 replies
  • 1120 views

Hello, 

 

I am using PTC Mathcad Prime 9.0 and really need to extract the all values of Sol Data of differential equations in Mathcad to Excel or CSV files.

I can only do make the graph with the data.

Your help or advice for the method will be very appreciated.

 

Thanks

Best answer by terryhendicott

Hi

Data to Excel use WRITEEXCEL() function or the EXCEL component.  

WRITEEXCEL() is found under Functions | Functions | File Access | WRITEEXCEL()

Excel Component is found under Input/Output | Data Import/Export | Excel Component.

WRITEEXCEL() can be used for large amounts of data while Component suits smaller datasets.

 

WRITECSV() does exactly what it says on the tin.

 

Cheers

Terry 

3 replies

21-Topaz II
February 27, 2024

Hi

Data to Excel use WRITEEXCEL() function or the EXCEL component.  

WRITEEXCEL() is found under Functions | Functions | File Access | WRITEEXCEL()

Excel Component is found under Input/Output | Data Import/Export | Excel Component.

WRITEEXCEL() can be used for large amounts of data while Component suits smaller datasets.

 

WRITECSV() does exactly what it says on the tin.

 

Cheers

Terry 

23-Emerald IV
February 27, 2024

Make sure the data you want to export is in a vector or a matrix, it is not possible to export a range. ( There is a distinct difference between vectors & matrices versus ranges.) Without seeing your Worksheet, I suspect you are using a range. 

Please attach your prime worksheet, so we can help you better.

 

Success!

Luc

25-Diamond I
February 27, 2024

You are talking about the solution of an ODE?
If you would have used one of the stand-alone solvers your result would have been a matrix and you should have no problems to export it via WRITEXLS or WRITECSV.

In case you used a solve block with odesolve( ), the result is a function and to export data you have to sample the function and create vectors for the x- and y-values.

 

You sure should provide your worksheet.