How to map interval [0, 100] to the interval [100, 350]?
Clash Royale CLAN TAG#URR8PPP
up vote
3
down vote
favorite
I have an interval $[0; 100]$ and would like to map it to this new interval: $[100;350]$.
I thought about multiplying it by $3.5$, but that would give the interval $[0;350]$. And adding to each of these elements $100$ would give: $[100;450]$. Hence my question: is it possible to do what I want?
Note that I can settle for the interval $[0;350]$ : in my program, it will be enough if I exclude the numbers present in the interval $[0;99]$.
interval-arithmetic
add a comment |Â
up vote
3
down vote
favorite
I have an interval $[0; 100]$ and would like to map it to this new interval: $[100;350]$.
I thought about multiplying it by $3.5$, but that would give the interval $[0;350]$. And adding to each of these elements $100$ would give: $[100;450]$. Hence my question: is it possible to do what I want?
Note that I can settle for the interval $[0;350]$ : in my program, it will be enough if I exclude the numbers present in the interval $[0;99]$.
interval-arithmetic
7
how about multiplying by 2.5 instead?
â Lord Shark the Unknown
19 hours ago
add a comment |Â
up vote
3
down vote
favorite
up vote
3
down vote
favorite
I have an interval $[0; 100]$ and would like to map it to this new interval: $[100;350]$.
I thought about multiplying it by $3.5$, but that would give the interval $[0;350]$. And adding to each of these elements $100$ would give: $[100;450]$. Hence my question: is it possible to do what I want?
Note that I can settle for the interval $[0;350]$ : in my program, it will be enough if I exclude the numbers present in the interval $[0;99]$.
interval-arithmetic
I have an interval $[0; 100]$ and would like to map it to this new interval: $[100;350]$.
I thought about multiplying it by $3.5$, but that would give the interval $[0;350]$. And adding to each of these elements $100$ would give: $[100;450]$. Hence my question: is it possible to do what I want?
Note that I can settle for the interval $[0;350]$ : in my program, it will be enough if I exclude the numbers present in the interval $[0;99]$.
interval-arithmetic
interval-arithmetic
edited 13 mins ago
200_success
667515
667515
asked 19 hours ago
JarsOfJam-Scheduler
1378
1378
7
how about multiplying by 2.5 instead?
â Lord Shark the Unknown
19 hours ago
add a comment |Â
7
how about multiplying by 2.5 instead?
â Lord Shark the Unknown
19 hours ago
7
7
how about multiplying by 2.5 instead?
â Lord Shark the Unknown
19 hours ago
how about multiplying by 2.5 instead?
â Lord Shark the Unknown
19 hours ago
add a comment |Â
5 Answers
5
active
oldest
votes
up vote
11
down vote
accepted
To map from $[a,b]$ to $[c, d]$,
Consider the straight line that connects $(a,c)$ to $(b,d)$.
We have the slope $m = fracd-cb-a,$ we are able to recover $m$.
$$y=mx+C$$
To recover $C$, just substitute one of the value say $(a,c)$ and solve for $C$. For our example, we have $a=0$ and $c=100$.
Hence your transformation can be of the form of $y=mx+100$. Can you compute the $m$ to find what you want?
add a comment |Â
up vote
17
down vote
The ratio of the lengths of the intervals is $2.5 :1,$ the position of the left extremity is shifted by $100.$ So take the mapping $$f(x)=2.5x+100.$$
add a comment |Â
up vote
6
down vote
You can consider $xmapsto ax + bcolon [0,100]to [100,350]$ such that $0mapsto 100$ and $100mapsto 350$.
Thus, $$a cdot 0 + b = 100,\ acdot 100 + b = 350,$$ and solving it gives $a = frac 52$, $b = 100$.
In general, the same technique works for intervals $[x_1,x_2]$ and $[y_1,y_2]$:
$$ax_1 + b = y_1\
ax_2 + b = y_2.$$
Solving it gives $a = fracy_2 - y_1x_2 -x_1$ and $b = y_1 - ax_1$. All in all, it's a line $$y - y_1 = fracy_2-y_1x_2-x_1(x-x_1).$$ Looks familiar?
add a comment |Â
up vote
5
down vote
Since $100cdot t^0=100$ for any positive $t$, we find $t$ such that $100cdot t^100=350implies t=3.5^0.01$. $$boxedy=100cdot3.5^0.01x$$ In general an exponential mapping from $[a,b]$ to $[c,d]$ is $y=cleft(frac dcright)^fracx-ab-a$.
1
Way too complicated; a simple affine transformation works.
â saulspatz
13 hours ago
1
@saulspatz I know, since the linear transformation has already been said three times. I just wanted to give the next best approach.
â TheSimpliFire
13 hours ago
But why the downvote?
â TheSimpliFire
12 hours ago
1
I don't think the answer contributes anything positive to the discussion.
â saulspatz
12 hours ago
4
@saulspatz My answer is an answer to the question: 'Is it possible to transform an interval into another?' What the OP specifically wanted has already been discussed many times, and I do not see any harm in adding an alternative method to perform such a transformation.
â TheSimpliFire
12 hours ago
add a comment |Â
up vote
2
down vote
Another method thatâÂÂs a bit more general and will come in handy if you want to map arbitrary curves is to parameterize your paths. That is, find a one-to-one mapping from your first path to $[0,1]$, $(0,1]$, or so on as appropriate. Then find a one-to-one mapping from $[0,1]$ to your second path. (The interval $[0,1]$ isnâÂÂt special, just convenient.) Finally, compose them.
LetâÂÂs say you want to map $x^2$ over the interval $[0,4]$ to $sin x$ over the interval $[0,2pi]$. A one-to-one mapping from the parabola to the line segment, $t: [0,4] to [0,1]$, is $t = sqrtx/2$, and a mapping from $t in [0,1]$ to a sine wave over $[0,2pi]$ is $sin 2pi t$. Substituting, we get $sin left( pi sqrtxright)$.
add a comment |Â
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
11
down vote
accepted
To map from $[a,b]$ to $[c, d]$,
Consider the straight line that connects $(a,c)$ to $(b,d)$.
We have the slope $m = fracd-cb-a,$ we are able to recover $m$.
$$y=mx+C$$
To recover $C$, just substitute one of the value say $(a,c)$ and solve for $C$. For our example, we have $a=0$ and $c=100$.
Hence your transformation can be of the form of $y=mx+100$. Can you compute the $m$ to find what you want?
add a comment |Â
up vote
11
down vote
accepted
To map from $[a,b]$ to $[c, d]$,
Consider the straight line that connects $(a,c)$ to $(b,d)$.
We have the slope $m = fracd-cb-a,$ we are able to recover $m$.
$$y=mx+C$$
To recover $C$, just substitute one of the value say $(a,c)$ and solve for $C$. For our example, we have $a=0$ and $c=100$.
Hence your transformation can be of the form of $y=mx+100$. Can you compute the $m$ to find what you want?
add a comment |Â
up vote
11
down vote
accepted
up vote
11
down vote
accepted
To map from $[a,b]$ to $[c, d]$,
Consider the straight line that connects $(a,c)$ to $(b,d)$.
We have the slope $m = fracd-cb-a,$ we are able to recover $m$.
$$y=mx+C$$
To recover $C$, just substitute one of the value say $(a,c)$ and solve for $C$. For our example, we have $a=0$ and $c=100$.
Hence your transformation can be of the form of $y=mx+100$. Can you compute the $m$ to find what you want?
To map from $[a,b]$ to $[c, d]$,
Consider the straight line that connects $(a,c)$ to $(b,d)$.
We have the slope $m = fracd-cb-a,$ we are able to recover $m$.
$$y=mx+C$$
To recover $C$, just substitute one of the value say $(a,c)$ and solve for $C$. For our example, we have $a=0$ and $c=100$.
Hence your transformation can be of the form of $y=mx+100$. Can you compute the $m$ to find what you want?
answered 19 hours ago
Siong Thye Goh
86.2k1459108
86.2k1459108
add a comment |Â
add a comment |Â
up vote
17
down vote
The ratio of the lengths of the intervals is $2.5 :1,$ the position of the left extremity is shifted by $100.$ So take the mapping $$f(x)=2.5x+100.$$
add a comment |Â
up vote
17
down vote
The ratio of the lengths of the intervals is $2.5 :1,$ the position of the left extremity is shifted by $100.$ So take the mapping $$f(x)=2.5x+100.$$
add a comment |Â
up vote
17
down vote
up vote
17
down vote
The ratio of the lengths of the intervals is $2.5 :1,$ the position of the left extremity is shifted by $100.$ So take the mapping $$f(x)=2.5x+100.$$
The ratio of the lengths of the intervals is $2.5 :1,$ the position of the left extremity is shifted by $100.$ So take the mapping $$f(x)=2.5x+100.$$
edited 13 hours ago
Jaideep Khare
17.6k32467
17.6k32467
answered 19 hours ago
user376343
1,542615
1,542615
add a comment |Â
add a comment |Â
up vote
6
down vote
You can consider $xmapsto ax + bcolon [0,100]to [100,350]$ such that $0mapsto 100$ and $100mapsto 350$.
Thus, $$a cdot 0 + b = 100,\ acdot 100 + b = 350,$$ and solving it gives $a = frac 52$, $b = 100$.
In general, the same technique works for intervals $[x_1,x_2]$ and $[y_1,y_2]$:
$$ax_1 + b = y_1\
ax_2 + b = y_2.$$
Solving it gives $a = fracy_2 - y_1x_2 -x_1$ and $b = y_1 - ax_1$. All in all, it's a line $$y - y_1 = fracy_2-y_1x_2-x_1(x-x_1).$$ Looks familiar?
add a comment |Â
up vote
6
down vote
You can consider $xmapsto ax + bcolon [0,100]to [100,350]$ such that $0mapsto 100$ and $100mapsto 350$.
Thus, $$a cdot 0 + b = 100,\ acdot 100 + b = 350,$$ and solving it gives $a = frac 52$, $b = 100$.
In general, the same technique works for intervals $[x_1,x_2]$ and $[y_1,y_2]$:
$$ax_1 + b = y_1\
ax_2 + b = y_2.$$
Solving it gives $a = fracy_2 - y_1x_2 -x_1$ and $b = y_1 - ax_1$. All in all, it's a line $$y - y_1 = fracy_2-y_1x_2-x_1(x-x_1).$$ Looks familiar?
add a comment |Â
up vote
6
down vote
up vote
6
down vote
You can consider $xmapsto ax + bcolon [0,100]to [100,350]$ such that $0mapsto 100$ and $100mapsto 350$.
Thus, $$a cdot 0 + b = 100,\ acdot 100 + b = 350,$$ and solving it gives $a = frac 52$, $b = 100$.
In general, the same technique works for intervals $[x_1,x_2]$ and $[y_1,y_2]$:
$$ax_1 + b = y_1\
ax_2 + b = y_2.$$
Solving it gives $a = fracy_2 - y_1x_2 -x_1$ and $b = y_1 - ax_1$. All in all, it's a line $$y - y_1 = fracy_2-y_1x_2-x_1(x-x_1).$$ Looks familiar?
You can consider $xmapsto ax + bcolon [0,100]to [100,350]$ such that $0mapsto 100$ and $100mapsto 350$.
Thus, $$a cdot 0 + b = 100,\ acdot 100 + b = 350,$$ and solving it gives $a = frac 52$, $b = 100$.
In general, the same technique works for intervals $[x_1,x_2]$ and $[y_1,y_2]$:
$$ax_1 + b = y_1\
ax_2 + b = y_2.$$
Solving it gives $a = fracy_2 - y_1x_2 -x_1$ and $b = y_1 - ax_1$. All in all, it's a line $$y - y_1 = fracy_2-y_1x_2-x_1(x-x_1).$$ Looks familiar?
edited 19 hours ago
answered 19 hours ago
Ennar
13.4k32343
13.4k32343
add a comment |Â
add a comment |Â
up vote
5
down vote
Since $100cdot t^0=100$ for any positive $t$, we find $t$ such that $100cdot t^100=350implies t=3.5^0.01$. $$boxedy=100cdot3.5^0.01x$$ In general an exponential mapping from $[a,b]$ to $[c,d]$ is $y=cleft(frac dcright)^fracx-ab-a$.
1
Way too complicated; a simple affine transformation works.
â saulspatz
13 hours ago
1
@saulspatz I know, since the linear transformation has already been said three times. I just wanted to give the next best approach.
â TheSimpliFire
13 hours ago
But why the downvote?
â TheSimpliFire
12 hours ago
1
I don't think the answer contributes anything positive to the discussion.
â saulspatz
12 hours ago
4
@saulspatz My answer is an answer to the question: 'Is it possible to transform an interval into another?' What the OP specifically wanted has already been discussed many times, and I do not see any harm in adding an alternative method to perform such a transformation.
â TheSimpliFire
12 hours ago
add a comment |Â
up vote
5
down vote
Since $100cdot t^0=100$ for any positive $t$, we find $t$ such that $100cdot t^100=350implies t=3.5^0.01$. $$boxedy=100cdot3.5^0.01x$$ In general an exponential mapping from $[a,b]$ to $[c,d]$ is $y=cleft(frac dcright)^fracx-ab-a$.
1
Way too complicated; a simple affine transformation works.
â saulspatz
13 hours ago
1
@saulspatz I know, since the linear transformation has already been said three times. I just wanted to give the next best approach.
â TheSimpliFire
13 hours ago
But why the downvote?
â TheSimpliFire
12 hours ago
1
I don't think the answer contributes anything positive to the discussion.
â saulspatz
12 hours ago
4
@saulspatz My answer is an answer to the question: 'Is it possible to transform an interval into another?' What the OP specifically wanted has already been discussed many times, and I do not see any harm in adding an alternative method to perform such a transformation.
â TheSimpliFire
12 hours ago
add a comment |Â
up vote
5
down vote
up vote
5
down vote
Since $100cdot t^0=100$ for any positive $t$, we find $t$ such that $100cdot t^100=350implies t=3.5^0.01$. $$boxedy=100cdot3.5^0.01x$$ In general an exponential mapping from $[a,b]$ to $[c,d]$ is $y=cleft(frac dcright)^fracx-ab-a$.
Since $100cdot t^0=100$ for any positive $t$, we find $t$ such that $100cdot t^100=350implies t=3.5^0.01$. $$boxedy=100cdot3.5^0.01x$$ In general an exponential mapping from $[a,b]$ to $[c,d]$ is $y=cleft(frac dcright)^fracx-ab-a$.
edited 15 hours ago
answered 15 hours ago
TheSimpliFire
11.4k62256
11.4k62256
1
Way too complicated; a simple affine transformation works.
â saulspatz
13 hours ago
1
@saulspatz I know, since the linear transformation has already been said three times. I just wanted to give the next best approach.
â TheSimpliFire
13 hours ago
But why the downvote?
â TheSimpliFire
12 hours ago
1
I don't think the answer contributes anything positive to the discussion.
â saulspatz
12 hours ago
4
@saulspatz My answer is an answer to the question: 'Is it possible to transform an interval into another?' What the OP specifically wanted has already been discussed many times, and I do not see any harm in adding an alternative method to perform such a transformation.
â TheSimpliFire
12 hours ago
add a comment |Â
1
Way too complicated; a simple affine transformation works.
â saulspatz
13 hours ago
1
@saulspatz I know, since the linear transformation has already been said three times. I just wanted to give the next best approach.
â TheSimpliFire
13 hours ago
But why the downvote?
â TheSimpliFire
12 hours ago
1
I don't think the answer contributes anything positive to the discussion.
â saulspatz
12 hours ago
4
@saulspatz My answer is an answer to the question: 'Is it possible to transform an interval into another?' What the OP specifically wanted has already been discussed many times, and I do not see any harm in adding an alternative method to perform such a transformation.
â TheSimpliFire
12 hours ago
1
1
Way too complicated; a simple affine transformation works.
â saulspatz
13 hours ago
Way too complicated; a simple affine transformation works.
â saulspatz
13 hours ago
1
1
@saulspatz I know, since the linear transformation has already been said three times. I just wanted to give the next best approach.
â TheSimpliFire
13 hours ago
@saulspatz I know, since the linear transformation has already been said three times. I just wanted to give the next best approach.
â TheSimpliFire
13 hours ago
But why the downvote?
â TheSimpliFire
12 hours ago
But why the downvote?
â TheSimpliFire
12 hours ago
1
1
I don't think the answer contributes anything positive to the discussion.
â saulspatz
12 hours ago
I don't think the answer contributes anything positive to the discussion.
â saulspatz
12 hours ago
4
4
@saulspatz My answer is an answer to the question: 'Is it possible to transform an interval into another?' What the OP specifically wanted has already been discussed many times, and I do not see any harm in adding an alternative method to perform such a transformation.
â TheSimpliFire
12 hours ago
@saulspatz My answer is an answer to the question: 'Is it possible to transform an interval into another?' What the OP specifically wanted has already been discussed many times, and I do not see any harm in adding an alternative method to perform such a transformation.
â TheSimpliFire
12 hours ago
add a comment |Â
up vote
2
down vote
Another method thatâÂÂs a bit more general and will come in handy if you want to map arbitrary curves is to parameterize your paths. That is, find a one-to-one mapping from your first path to $[0,1]$, $(0,1]$, or so on as appropriate. Then find a one-to-one mapping from $[0,1]$ to your second path. (The interval $[0,1]$ isnâÂÂt special, just convenient.) Finally, compose them.
LetâÂÂs say you want to map $x^2$ over the interval $[0,4]$ to $sin x$ over the interval $[0,2pi]$. A one-to-one mapping from the parabola to the line segment, $t: [0,4] to [0,1]$, is $t = sqrtx/2$, and a mapping from $t in [0,1]$ to a sine wave over $[0,2pi]$ is $sin 2pi t$. Substituting, we get $sin left( pi sqrtxright)$.
add a comment |Â
up vote
2
down vote
Another method thatâÂÂs a bit more general and will come in handy if you want to map arbitrary curves is to parameterize your paths. That is, find a one-to-one mapping from your first path to $[0,1]$, $(0,1]$, or so on as appropriate. Then find a one-to-one mapping from $[0,1]$ to your second path. (The interval $[0,1]$ isnâÂÂt special, just convenient.) Finally, compose them.
LetâÂÂs say you want to map $x^2$ over the interval $[0,4]$ to $sin x$ over the interval $[0,2pi]$. A one-to-one mapping from the parabola to the line segment, $t: [0,4] to [0,1]$, is $t = sqrtx/2$, and a mapping from $t in [0,1]$ to a sine wave over $[0,2pi]$ is $sin 2pi t$. Substituting, we get $sin left( pi sqrtxright)$.
add a comment |Â
up vote
2
down vote
up vote
2
down vote
Another method thatâÂÂs a bit more general and will come in handy if you want to map arbitrary curves is to parameterize your paths. That is, find a one-to-one mapping from your first path to $[0,1]$, $(0,1]$, or so on as appropriate. Then find a one-to-one mapping from $[0,1]$ to your second path. (The interval $[0,1]$ isnâÂÂt special, just convenient.) Finally, compose them.
LetâÂÂs say you want to map $x^2$ over the interval $[0,4]$ to $sin x$ over the interval $[0,2pi]$. A one-to-one mapping from the parabola to the line segment, $t: [0,4] to [0,1]$, is $t = sqrtx/2$, and a mapping from $t in [0,1]$ to a sine wave over $[0,2pi]$ is $sin 2pi t$. Substituting, we get $sin left( pi sqrtxright)$.
Another method thatâÂÂs a bit more general and will come in handy if you want to map arbitrary curves is to parameterize your paths. That is, find a one-to-one mapping from your first path to $[0,1]$, $(0,1]$, or so on as appropriate. Then find a one-to-one mapping from $[0,1]$ to your second path. (The interval $[0,1]$ isnâÂÂt special, just convenient.) Finally, compose them.
LetâÂÂs say you want to map $x^2$ over the interval $[0,4]$ to $sin x$ over the interval $[0,2pi]$. A one-to-one mapping from the parabola to the line segment, $t: [0,4] to [0,1]$, is $t = sqrtx/2$, and a mapping from $t in [0,1]$ to a sine wave over $[0,2pi]$ is $sin 2pi t$. Substituting, we get $sin left( pi sqrtxright)$.
edited 10 hours ago
answered 10 hours ago
Davislor
2,260715
2,260715
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2953600%2fhow-to-map-interval-0-100-to-the-interval-100-350%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
7
how about multiplying by 2.5 instead?
â Lord Shark the Unknown
19 hours ago