Another relationship of variables

In summary, the conversation discusses programming a software to align pictures on a 2D plane and finding a relationship between the columns and rows of the pictures. A formula is provided to calculate the column and row values for each picture. The conversation ends with a simple solution being discovered.
  • #1
eNathan
352
2
Yet again, I am programming a software to align pictures on a 2D plane, kinda like they are in windows exploror. I need to find a relationship betwen these.

I C R
_______
1 1 1
2 1 2
3 1 3
4 1 4
5 1 5
6 1 1
7 2 2
8 2 3
9 2 4
10 2 5
11 3 1

I would be my for loop counter, C would be the colum of picture I, and R would be what row it belongs to.

I already know that
C = Ceil(i / 5);
And I have come close to finding the value of R, so far I have
R = i - (Floor(i/(5 + C))*5);
But I know the latter equation is wrong, I just can't seem to figure it out out.

Thanks in advanve :smile:
 
Mathematics news on Phys.org
  • #2
eNathan said:
...6 1 1
7 2 2
8 2 3
Are you sure 6 1 1? I think it should read 6 2 1.
C = [(I - 1) / 5] + 1. Where [...] is a function that takes the integer part before the decimal point of a real number. Ex : [1.5] = 1.
In some programming languages, you can write it as : C = Int((I - 1) / 5) + 1.
R = I - (C - 1) * 5.
Viet Dao,
 
Last edited:
  • #3
VietDao29 said:
Are you sure 6 1 1? I think it should read 6 2 1.
C = [(I - 1) / 5] + 1. Where [...] is a function that takes the integer part before the decimal point of a real number. Ex : [1.5] = 1.
In some programming languages, you can write it as : C = Int((I - 1) / 5) + 1.
R = I - (C - 1) * 5.
Viet Dao,

Oh my It was soooo simple! I am speechless. Of course, just subtract from I, 5 C abount of times (and add one of course).

Thank you very much.
 

FAQ: Another relationship of variables

What is the definition of "Another relationship of variables"?

"Another relationship of variables" refers to the statistical analysis of the correlation or association between two or more variables, beyond the commonly known cause-and-effect relationship. It aims to understand how one variable affects or influences another variable, and whether this relationship is positive, negative, or neutral.

How is "Another relationship of variables" different from simple cause-and-effect relationships?

Simple cause-and-effect relationships focus on one variable directly causing a change in another variable. In "another relationship of variables", the focus is on exploring the relationship between two or more variables, and how they may interact or influence each other in more complex ways.

What are some commonly used statistical methods for analyzing "Another relationship of variables"?

Some commonly used statistical methods for analyzing "another relationship of variables" include correlation analysis, regression analysis, and ANOVA (analysis of variance). These methods help to determine the strength, direction, and significance of the relationship between variables.

How can "Another relationship of variables" be used in scientific research?

"Another relationship of variables" can be used in scientific research to better understand the complex relationships between different variables and to make predictions about how they may interact in various situations. It can also help researchers to identify potential confounding variables and control for them in their studies.

What are some limitations of "Another relationship of variables" in scientific research?

One limitation of "another relationship of variables" is that it can only establish correlation, not causation. This means that while two variables may be found to be statistically related, it does not necessarily mean that one directly causes the other. Additionally, the relationship between variables may change over time or in different contexts, so it is important to interpret the results with caution.

Back
Top