How do I scale coordinates for different size

조회 수: 15 (최근 30일)
OriAlpha
OriAlpha 2018년 12월 20일
다시 열림: madhan ravi 2018년 12월 21일
Hello,
how to scale different size coordinates
for example,
i have 2 points in graph which is 960 and 882 (this is referance point)
my next point will be 920 and 850
now how can i scale to my referance point
i need make this
Untitled.png
  댓글 수: 2
jonas
jonas 2018년 12월 20일
Care to elaborate?
OriAlpha
OriAlpha 2018년 12월 20일
편집: OriAlpha 2018년 12월 20일
my current value which is 920,850 i have to get new value interms of 960,882
its about adjusting the scale

댓글을 달려면 로그인하십시오.

채택된 답변

Star Strider
Star Strider 2018년 12월 20일
I am not certain what you want.
Try this:
Scale = [920 1; 850 1] \ [960; 882]
NewValue = [920 1; 850 1] * Scale
producing:
Scale =
1.114285714285713
-65.142857142856428
NewValue =
960
882
This simply does a linear regression (of sorts) between the old value and the new value.
  댓글 수: 2
OriAlpha
OriAlpha 2018년 12월 20일
Untitled.png
Star Strider
Star Strider 2018년 12월 20일
You changed the numbers in your Question, so just change the numbers in the ‘Scale’ calculation in my Answer:
Scale = [920 1; 850 1] \ [960; 870]
NewValue = [920 1; 850 1] * Scale
producing:
Scale =
1.28571428571428
-222.857142857142
NewValue =
960
870

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by