T O P I C R E V I E W |
giordandue |
Posted - 07/09/2011 : 02:04:31 AM Origin Ver. and Service Release (Select Help-->About Origin): 8.5.1 Operating System:Windows7 64bit
Hi, In this new Origin version, I am not more able to find the "z-value" at the interception in the contour/image profile, as it was present in the previous version. Is it no more available? Thank you in advance |
11 L A T E S T R E P L I E S (Newest First) |
giordandue |
Posted - 07/16/2011 : 09:10:03 AM I have solved.. Thank you again |
giordandue |
Posted - 07/15/2011 : 02:56:23 AM Hi Penn, thank you. I tried to follow the OCguide, but I get a error. These are the steps I followed: 1) Open the file origine file and the relative matrix (Mat2DBin4); 2) Click the code builder, new C File, setting the name "mode" 3) copy your code and click the button "build" 4) the output window says: compiling... mode.c Linking... Done!
However, nothing is displayed in the other window (in the OC guide "Local Variables"). I print either "test" or "mode" in the LabTalkConsol", but I get "Command error!" I tried the same using the script window, but with same result. I repeated, changing the name, etc., but I have not solved (incidentally, to delete the previous function is sufficient to delete them in the OriginC workspace? Thank you and regards
|
Penn |
Posted - 07/14/2011 : 9:19:10 PM Hi,
There is a Hello World tutorial in this page on how to use Origin C. To run the example on getting XY coordinate, you can refer to this Hello World tutorial. And the getting XY coordinate example needs a matrix to be active.
Penn |
giordandue |
Posted - 07/14/2011 : 07:18:14 AM Hi Penn, thank you.. I tried to copy and enter the example in the Command Window (is it correct?), but I got #Command error! I get the same error opening the matrix (Mat2DBin3) and launching the command, as well as opening the Image Profile derived by the same matrix and launching the command. Probably I am doing some mistake (incidentally, I am copying all the command, i.e. from "void" to the last parenthesis.. Am I right? |
Penn |
Posted - 07/14/2011 : 04:34:01 AM Hi,
Here is an Origin C example on how to get XY coordinate of min/max Z from matrix.
Penn |
giordandue |
Posted - 07/13/2011 : 09:12:11 AM http://www.originlab.com/ftp/forum_and_kbase/Images/profile.pdf
Hi Hideo, thank you.. I have the attached profile and the question is: is it possible to derive the x-y value that will give the max Z-value? I suppose that these values should be very close to the relative x-y mode-Values. Regards
|
easwar |
Posted - 07/13/2011 : 06:44:50 AM Hi,
Try this script, where it is assumed your graph has the default setting of three layers, the data the horizontal and vertical profiles (so you have not plotted them in separate graphs):
// Make layer 1 active and save profile line positions
page.active=1;
double dhliney = hline.y;
double dvlinex = vline.x;
// Make layer 2 active and find z
page.active=2;
double dz1 = %c(dhliney);
// Make layer 3 active and find z
page.active=3;
double dz2 = %c(dvlinex);
// Report average
double dz = (dz1+dz2)/2;
type Z value: $(dz);
Easwar OriginLab |
giordandue |
Posted - 07/13/2011 : 04:00:00 AM Dear Hideo, thank you for your help. It seems to me that the result I am getting it is not what I am expecting. What I need it is to obtain the max Z value associate to a X-Y intersection, in order to be sure that the relative x-y values are the modes of the two distributions. Maybe it is more direct to use the matrix, but I was thinking that also the Z-value (max) approach was possible..Thank you again.. |
Hideo Fujii |
Posted - 07/11/2011 : 2:12:06 PM Hi giordandue,
Right, the X/Y is a term at each profiled line plot. In terms of X/Y/Z in the image plot, the script should be like:
///////////////////////////////////////// range VProf=[ProfileData]VLineProfile!2; range HProf=[ProfileData]HLineProfile!2; layer -s 1; type HProfile X:$(HLine.x) Z:$(HProf(HLine.x)); type VProfile Y:$(VLine.y) Z:$(VProf(VLine.y)); type Z Average: $((VProf(VLine.y)+HProf(HLine.x))/2); /////////////////////////////////////////
Best,
--Hideo Fujii OriginLab |
giordandue |
Posted - 07/11/2011 : 12:12:23 PM Thank you for your answer. If I am not wrong by applying your script, I am getting a "Y average": Is it the "z-value"? Regards. |
Hideo Fujii |
Posted - 07/11/2011 : 10:52:33 AM Hi giordandue,
When we redesigned the profile tool, this feature of showing the Z value at the intersection was skipped. We apologize for the inconvenience. We are considering if we should bring it back in the next version. For now, you can paste the following script to the Script window, highlight all lines, then press ENTER key to run it. (Note that vertical and horizontal values may be slightly different because of the interpolations of different directions. So, I also made their average.)
///////////////////////////////////////// range VProf=[ProfileData]VLineProfile!2; range HProf=[ProfileData]HLineProfile!2; layer -s 1; type VProfile X:$(VLine.y) Y:$(VProf(VLine.y)); type HProfile X:$(HLine.x) Y:$(HProf(HLine.x)); type Y Average: $((VProf(VLine.y)+HProf(HLine.x))/2); /////////////////////////////////////////
--Hideo Fujii OriginLab |