Author |
Topic  |
|
kostas77
Greece
Posts |
Posted - 07/09/2005 : 01:59:50 AM
|
Origin Version (Select Help-->About Origin): Origin 7.5 Operating System: Windows XP
Hi,
I have a worksheet which I would like to convert to a matrix in order to plot some contours. The worksheet consists of three columns. The first column represents the X-values the second the Y-values and the third the Z-values. The problem is that the x and y values are not evenly spaced and I cannot convert it to a matrix. Does anyone know how to overcome this? I tried to search on the previous posts, but couldn't find something helpful. Thanx!
Kostas
P.S.: I already used random xyz conversion methods, but I can't get any satisfactory results.
Edited by - kostas77 on 07/09/2005 02:00:28 AM
Edited by - kostas77 on 07/09/2005 02:02:49 AM |
|
easwar
USA
1965 Posts |
Posted - 07/09/2005 : 9:09:50 PM
|
Hi Kostas,
If the X, Y values are not regular/evenly spaced, the only option is to use one of the random conversion methods, which then performs gridding on the data to create a regularly spaced matrix.
Please send your data to tech support so that they can take a look and make suggestions. If you contact tech support, please refer to this forum post.
Easwar OriginLab
|
 |
|
kostas77
Greece
Posts |
Posted - 07/10/2005 : 5:04:48 PM
|
First of all thanks for the reply! My values are not evenly spaced but they could just be in a matrix form, without the "interpolation" that random methods use. For example a set of my data is:
___X______Y_____Z___
0.0025 0.0125 0.74732 0.0025 0.0375 0.74312 0.0025 0.0625 0.73804 0.0025 0.0875 0.73253
0.0075 0.0125 0.74034 0.0075 0.0375 0.73207 0.0075 0.0625 0.72467 0.0075 0.0875 0.7178
0.01001 0.0125 0.6693 0.01001 0.0375 0.66178 0.01001 0.0625 0.65504 0.01001 0.0875 0.64876
0.01004 0.0125 0.6042 0.01004 0.0375 0.59725 0.01004 0.0625 0.59101 0.01004 0.0875 0.58519
0.01006 0.0125 0.54371 0.01006 0.0375 0.53721 0.01006 0.0625 0.53138 0.01006 0.0875 0.52593
0.01009 0.0125 0.48695 0.01009 0.0375 0.48082 0.01009 0.0625 0.47532 0.01009 0.0875 0.47017
What I want, is to get that data in a matrix form like the following:
_________0.0125____0.0375___0.0625__0.0875 0.0025______z________z________z________z 0.0075______z________z________z________z 0.01001_____z________z________z________z 0.01004_____z________z________z________z 0.01006_____z________z________z________z 0.01009_____z________z________z________z
where x, are the respective z values.
Edited by - kostas77 on 07/10/2005 5:10:27 PM
Edited by - kostas77 on 07/10/2005 5:11:24 PM
Edited by - kostas77 on 07/10/2005 5:12:24 PM |
 |
|
Leo_Li
China
Posts |
Posted - 07/10/2005 : 11:01:57 PM
|
Try this: Sparse XYZ Conversion: X Step Value: 0.00001 Y Step Value: 0.025
Leo OriginLab |
 |
|
kostas77
Greece
Posts |
Posted - 07/11/2005 : 3:07:57 PM
|
I couldn't make it work either. Did you actually make it work? Thanx for your reply either way!
Edited by - kostas77 on 07/11/2005 3:10:02 PM |
 |
|
easwar
USA
1965 Posts |
Posted - 07/11/2005 : 3:33:27 PM
|
Hi Kostas,
The Y values in your data are regularly spaced, with a spacing of 0.025 whereas your X values are not evenly spaced. The difference is 0.0050 in the beginning and then 0.00001 later.
This is why, to use sparse conversion, Leo was suggesting to set the X step size to 0.00001. If you do that you will get a matrix with 740 cols and 4 rows (note that X values go along the cols and Y goes along the rows in the conversion process - you can always transpose the matrix later).
This is because the matrix object has to have regular spacing in both X, Y directions. So it is not possible to have a matrix that has values that you specify in the output that you desire. Note that in your desired output for the matrix, your row values go as: 0.0025, 0.0075, 0.01001, 0.01004 etc which is irregular spacing and not possible for such a coordinate system for the matrix object.
This is why earlier I had suggested using random conversion where you get a grid that is created using your original raw data.
If you highlight the Z col and then select Edit->Convert to Matrix->Random and then select Quick Correlation as the method of conversion and set num cols to 6 and num rows to 4, you will get result such as pasted below, which is a pretty good representation of your raw data? You can opt to have more cols and rows for a finer grid etc.
Easwar OriginLab

|
 |
|
|
Topic  |
|
|
|