Message Boards Message Boards

Export matrix data to plot in third party softwares?

GROUPS:

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

Answer
16 days ago

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

POSTED BY: Gustavo Delfino
Answer
16 days ago

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)

Answer
15 days ago

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.

Answer
15 days 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?

POSTED BY: Gustavo Delfino
Answer
15 days ago

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:
Answer
15 days 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,

POSTED BY: Gustavo Delfino
Answer
14 days ago

Group Abstract Group Abstract