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
 LabTalk Forum
 vertical profile 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
bedibra Posted - 08/31/2017 : 08:19:16 AM
Dear all,
I am looking for a script that gives me the possibility to get the vertical profile of the a matrix (as in the picture), where I have to specify the X value and the size of the line.
I found the mat.profile. property, but I don't know how to use it.
if possible I want the profile in the [book1]sheet1!col(a).
thanks,

6   L A T E S T    R E P L I E S    (Newest First)
bedibra Posted - 09/01/2017 : 11:09:28 AM
I am using the 2016 version. it will be very helpfull, if we can get automatically on a sheet the values of a vertical profile of a matrix .

quote:
Originally posted by cpyang

Which version of Origin are you using?
We can put together some Origin C code and provide it as an X-Function to be used from LabTalk.

CP


Hideo Fujii Posted - 09/01/2017 : 10:16:34 AM
Hi bedibra,

It appears that mat.profile object method works to create the profile worksheet data as described in
http://www.originlab.com/doc/LabTalk/ref/mat-obj .
For example, try the following snippet:
win -t mat;  //make a new matrix
matrix -ps DIM 300 300;  //set the dimensions
mat.matname$ = %H;       //set the matrix name
msetvalue im:=[%(mat.matname$)]1!1 formula:="sin(x)+sin(y)";  //Fill data in matrix
win -t wks xyz;      //create the profile worksheet
mat.wksname$ = %H;   //worksheet name
mat.profile.angle=0; //angle for Z profile
mat.profile(3,3);    //produce profile data
wks.colSel(3,1);     //select the Z column
worksheet -P 240 glTraject;  //plot as a 3D line
Hope this helps.

--Hideo Fujii
OriginLab
cpyang Posted - 09/01/2017 : 10:04:49 AM
Which version of Origin are you using?
We can put together some Origin C code and provide it as an X-Function to be used from LabTalk.

CP
bedibra Posted - 09/01/2017 : 09:36:28 AM
any ideas ?
bedibra Posted - 08/31/2017 : 5:56:01 PM
thanks for your reply. However this is not really what I want.
is there a way to use this :
mat.profile(?????) ;
mat.profile.vSection=10;
mat.profile.vWksName$=[book1]sheet1!;
mat.profile.vYCol=1;
however I am getting some difficulties to make it work, and I am getting this error message: Must specify 3 values as arguments.

I am pretty sure that this is what I am looking for but I really need help to make it work.
thanks



quote:
Originally posted by Hideo Fujii

Hi bedibra,

You can save your vertical profile plot as a template, then you can make the plot by plotm x-function.
Try the following snippet:

img2m -r 2;  //Convert the image to data matrix
mname$=%H;   //matrix name
plotm im:=[mname$]!1 plot:=220 ogl:=[<new template:=myVProfile>];  //Plot the matrix using the template
imageprofile;  //Activate as a image profile
pname$=%H;     //graph name
speedmode sm:=off; //turn off speed mode
page.active = 1;  //activate the main layer
VLine.x=100;   //position of 1st line
VLine1.x=150;  //position of 2nd line
window -a Book1;  //activate the worksheet
worksheet -s 1 1 1 1;  //select a cell
insertGraph gname:=%(pname$) embed:=1;  //embed the graph to the cell
Works?

--Hideo Fujii
OriginLab


Hideo Fujii Posted - 08/31/2017 : 4:19:53 PM
Hi bedibra,

You can save your vertical profile plot as a template, then you can make the plot by plotm x-function.
Try the following snippet:

img2m -r 2;  //Convert the image to data matrix
mname$=%H;   //matrix name
plotm im:=[mname$]!1 plot:=220 ogl:=[<new template:=myVProfile>];  //Plot the matrix using the template
imageprofile;  //Activate as a image profile
pname$=%H;     //graph name
speedmode sm:=off; //turn off speed mode
page.active = 1;  //activate the main layer
VLine.x=100;   //position of 1st line
VLine1.x=150;  //position of 2nd line
window -a Book1;  //activate the worksheet
worksheet -s 1 1 1 1;  //select a cell
insertGraph gname:=%(pname$) embed:=1;  //embed the graph to the cell
Works?

--Hideo Fujii
OriginLab

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