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
 All Forums
 Origin Forum for Programming
 Forum for Automation Server/COM and LabVIEW
 Changing the X and Y axis definition of a Matrix

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
codexplorer Posted - 12/12/2015 : 2:22:21 PM
Origin Ver. 9.1.0 64 bit SR1
Operating System: Windows 7 64 bit

I am exporting a matrix of Z values from LabVIEW to Origin which I later want to plot in Origin as an intensity map.
I want to save the X and Y axis range information while I am doing that, but I haven't been able to figure out how so far.
I am referring to the equivalent of these actions within Origin:

- Select all rows and columns
- right-click menu: Set Matrix Dimension/Labels...
- fill in the 4 values X1, X2, Y1, Y2 in the "xy Mapping" tab:
Map Column to x: From X1 To X2
Map Row to y: From Y1 To Y2

I suspect that using a labTalk script (from within LabVIEW) might do the trick, but my attempt to execute the following script on the Matrix Object I just created and populated in LabVIEW, doesn't do anything (it doesn't throw an error either):

mdim cols:=%d rows:=%d x1:=%f x2:=%f y1:=%f y2:=%f;

where the %d and %f values are replaced by the correct values after passing through a Format to String function.

Any suggestion would be welcome.
2   L A T E S T    R E P L I E S    (Newest First)
codexplorer Posted - 12/25/2015 : 6:20:05 PM
quote:
Originally posted by Penn

Hi,

I have made some little change to the one of Origin's built-in examples, "Matrix Access.vi", and get it correct. When open this vi in LabVIEW, I changed the LabTalkStr as the following:

mdim x1:=10 x2:=20 y1:=100 y2:=200;
matrix -v sin(x)+cos(y);

To see if the XY data is set correct, you can turn on XY data by menu View: Show X/Y.

Penn



Where would I find the Matrix Access.vi? Or equivalently, what sequence of calls to the Automation Server is performed?

Nevermind, I found it: http://www.originlab.com/doc/LabVIEW/examples/Matrix-Access
However, if I try that idea, it doesn't work for me. Here is the code I use:



When I execute it, no error is generated, the matrix is populated as instructed but the X and Y values shown when performing the View>>Show X/Y trick are the default values 10/i (where i = 1 to N, where N is the dimension, are the value indices). In other words, the default value of 10 for the X and Y range are not modified by the script.
Penn Posted - 12/21/2015 : 10:27:06 PM
Hi,

I have made some little change to the one of Origin's built-in examples, "Matrix Access.vi", and get it correct. When open this vi in LabVIEW, I changed the LabTalkStr as the following:

mdim x1:=10 x2:=20 y1:=100 y2:=200;
matrix -v sin(x)+cos(y);

To see if the XY data is set correct, you can turn on XY data by menu View: Show X/Y.

Penn

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000