The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Put Origin Matrix Data to Matlab
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

LHFT

Germany
Posts

Posted - 01/28/2005 :  08:21:22 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (7.5 German SR5):
Operating System: Win2k
Matlab:7.0.1.24704 (R14) SP1

Hi:
Getting Matlab data from the console to a Origin Matrix with "gr_Matrix" works fine. But "pr_Matrix" from Origin to Matlab does nothing. It generates no error when "Matrix" exists in Origin, but no Matrix variable is generated in the Matlab workspace.

Especially for math postprocessing complex data (real and imaginary or magnitude and phase parts in differnt rows in a Origin worksheet) we would need Matlab for complex calculus.

Using NAG C is not an option for us because we are used only to Matlab for all kinds of arithmetics and numerical simulations.

Regards
Rainer

greg

USA
1379 Posts

Posted - 01/28/2005 :  5:23:26 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
There may be a delay when sending data to Matlab, but it should appear if you refresh. (Maybe use desktop command to see the results?) Also be aware of case sensitivity in Matlab.

Note that an Origin Matrix does not support complex data, so it's up to you to split the data into two matrices to send to Matlab. You can then combine these in Matlab with:
Matrix3 = Matrix1 + Matrix2 * 1i


Go to Top of Page

LHFT

Germany
Posts

Posted - 01/31/2005 :  04:39:39 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks, Greg. But still no success.

Checked all:
-Generated a new "Matrix1" in Origin with some entries, 2x2 matrix
-"pr Matrix1" in Matlab console, no error
-Delay: Waited for minutes, no Matrix1 in Matlab
-Refresh does not help
-"who" in Matlab shows nothing
-Of course Matlab is case sensitive
-We would handle complex data as you suggested but we even can't get real datas from Origin to Matlab

Regards
Rainer

Edited by - LHFT on 01/31/2005 04:40:59 AM
Go to Top of Page

greg

USA
1379 Posts

Posted - 01/31/2005 :  10:23:27 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Please verify that the matrix type is double.

The 2x2 matrix has me suspicious about how you create this matrix. For example, when an image is imported into a matrix, the matrix has a temporary size of 2x2, but this matrix should not be used for anything until an image to data conversion is executed which generates the full gray scale data and is always of type integer.


Go to Top of Page

LHFT

Germany
Posts

Posted - 02/01/2005 :  3:41:49 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
No, Origin to Matlab export does not work.

Checked with two ways to produce the Matrix in Origin:
First:
Menu:File:New:Matrix
Matrix properties: data type double(8)
Matrix dimensions: 2 rows, 2 columns for example
Manully edit some random numbers in the cells
Second:
Measured data in a worksheet, 2 columns, many rows
Converted two Matrix directly

Neither Matrix is getting exported to Matlab.

We could really need this feature for post processing some data allready captured in Origin.
Go to Top of Page

easwar

USA
1965 Posts

Posted - 02/01/2005 :  5:43:24 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Rainer,

We can reproduce the same problem you are encountering, when testing with MATLAB7.

MATLAB 7 was released well after Origin 7.5 was released, and looks like some things changed that is causing the pr command in particular to malfunction (it works fine with MATLAB 6.1).

We have fixed this, and the fix can be applied as follows:

1> Download the following ZIP file and unzip the one file inside of it, called MatlabConsole.OP and save it to disk in some temporary folder
ftp://ftp.originlab.com/pub/USERS/MATLABFix.zip br /
2> Close Origin
3> Navigate to the \OriginC\OriginLab subfolder under the Origin EXE path (the main installation path) and locate the old MatlabConsole.OP file that exists there, and delete it (or rename it)
4> Copy over the new .OP file from the zip file to this same subfolder location (thus replacing the old file)
5> Start Origin
6> Go to Code Builder (menu command View->Code Builder)
7> In code builder, select menu File->New Workspace, and then close Code Builder
8> Go to Origin menu and use the Tools->MATLAB console menu to launch MATLAB

The pr command should then work fine.

Our apologies for the confusion earlier.

Easwar
OriginLab


Edited by - easwar on 02/01/2005 5:44:06 PM
Go to Top of Page

LHFT

Germany
Posts

Posted - 02/02/2005 :  03:43:33 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Ah, thanks. I allways thought it could be related to Matlab 7.

Unfortunately with your patch the Matlab console doesn't even start.

- Anything else I have to do in the code bulider? I'm not familiar with it.

- Remember I'm using the German version. Would this require a spceial patch?

- Matlab uses a network license server at our site.

Regards
Rainer

Go to Top of Page

easwar

USA
1965 Posts

Posted - 02/02/2005 :  07:39:52 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Rainer,

I had tested the .OP file I sent you yesterday and it worked fine for me. I think this is better resolved by us contacting you directly. We will do that via e-mail.

Once we have sorted this out, we will post a general solution for this problem on our site for others who may be facing the same problem.

Easwar
OriginLab


Go to Top of Page

easwar

USA
1965 Posts

Posted - 02/24/2005 :  12:08:52 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

An update for the MATLAB Console tool is now available in our File Exchange area:
http://www.originlab.com/FileExchange/details.aspx?fid=98

This update fixes problems with current tool that resulted from changes in MATLAB 7. It also introduces a few new commands to send datasets from Origin to MATLAB (previously could only send matrices).

Easwar
OriginLab

Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000