Message Boards Message Boards

GROUPS:

Export matrix data to plot in third party softwares?

Posted 11 months ago
1145 Views
|
6 Replies
|
2 Total Likes
|

Dear all,

I have a 3D contour image from which I have extracted the data points in a matrix format. This data is not readable in third party software to plot them. The codes are below:

Img=ImageData![platelets][1]//MatrixData

I have tried exporting into cdf file, but it is unreadable in Origin software. Can you please recommend someways to export them?

Thank you.

Best regards, Surendra Anantharaman

6 Replies
Posted 11 months ago

What formats are readable by the "Origins software"? You can use Export to generate files in a wide variety of formats.

Hi Gustavo,

Thank you very much for your reply.

Origin can import several formats as mentioned below. To me, it looks ASCII, CDF and Mat are possible ones. If so, can you please help me with the command I should include to convert the matrix information. If someother better format strikes your mind please input me.

ASCII, Thermo (SPC, CGM), Princeton Instruments (SPE), Binary 2D Array, CDF (CDF), EarthProbe (EPA), HDF5 (H5, HE, HDF5), NetCDF, MATLAB (Mat)

I found that Export["file.mat",expr] exports any numeric array to a MAT-file. In this case, should it be Export["platelets.mat",expr] to get a .mat file? Please correct me if I am wrong.

Posted 11 months ago

For now, I recommend you to stick first with ASCII formats. An example ASCII format is TSV (tab separated value). This is an example:

Export["test.tsv",{{1,2},{3,4}}]

FilePrint["test.tsv"]
1   2
3   4

Are you sure that the expression you are trying to export is indeed a matrix?

Hi,

Indeed, it is a matrix. I have exported the data in .tsv file and attached here for your reference.

Now, can it be made better by exporting as mat file for easier handling by Origin?

Attachments:
Posted 11 months ago

That file is a text file and has tsv extension but it is not a TSV file. This likely happened because as your expression is not a list. Use Head or FullForm on your expression to see what is going on. Once you solve this you will be able to export to other format like MAT,

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract