Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compare a data

Status
Not open for further replies.

kreop

Technical User
Oct 9, 2005
14
JP
I has a question about a pointer. For example I has a data as below,
Code:
data_1[frame][axis]={{1,2,3},{2,3,4},...,{x,y,z}}
data_2[frame][axis]={{3,4,5},{4,5,6},...,{x,y,z}}

[u]in memory[/u] 
result_data[frame][i]={1,0,1,0,2,0,3,....,n}

data_1[frame][axis]-data_2[frame][axis]=[COLOR=red]POINTER[/color]result_data[frame][i]

I want to make a comparism of the submission of data_1 and data_2 with result_data. The result of submission has it own value and ignore it but use another information in memory result_data for comparism. I confuse on how to use a pointer.

Thank You
 
I'm not exactly sure what you're trying to say?
From the code you have there, I'm assuming you want to end up with something like this:
Code:
data_1[frame][axis]={{1,2,3},{2,3,4},...,{x,y,z}}
data_2[frame][axis]={{3,4,5},{4,5,6},...,{x,y,z}}
result_data[frame][i]={{-2,-2,-2},{-2,-2,-2},...,{x-x,y-y,z-z}}
Does that look right?
In that case, you have this assignment in the wrong direction:
Code:
result_data[frame][i] = data_1[frame][axis]-data_2[frame][axis]
 
Thank you.
result_data[frame] is a data from other calculation. My purpose is to match
Code:
data_1[frame][axis]-data_2[frame][axis] with result_data[frame][i] or 
data_1[frame][axis]-data_2[frame][axis]=[COLOR=red]POINTER[/color]result_data[frame][i]
I guess pointer can be used here to match the submission of data1&2 with result_data.
The real value of submission data_1&data_2 as below,
Code:
data_1[frame][axis]-data_2[frame][axis]={{-2,-2,-2},{-2,-2,-2},...,{x-x,y-y,z-z}}
My purpose is not to calculate the submission of these two data, but to use its equation to match with result_data
Code:
result_data[frame][i]={1,0,1,0,2,0,3,....,n}

Result_data is another calculation which is included the submission result of data_1 & data_2.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top