equation or formula for multiple values to equal a constant

조회 수: 1 (최근 30일)
Jonathan
Jonathan 2023년 3월 26일
답변: Walter Roberson 2023년 3월 26일
Constant is 56.68 and the values are 32.06, 34.26, 35.84, 39.2, 44.92, 52.24
  댓글 수: 1
Dyuman Joshi
Dyuman Joshi 2023년 3월 26일
What is the problem you are facing? How does this relate to MATLAB?

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

답변 (1개)

Walter Roberson
Walter Roberson 2023년 3월 26일
format long g
x = [32.06, 34.26, 35.84, 39.2, 44.92, 52.24];
y = repelem(56.68, 1, length(x));
p = polyfit(x, y, 2)
p = 1×3
3.76776092277655e-17 -2.98849947796685e-15 56.6800000000001
To within round-off error, the formula is
y = 0*x^2 + 0*x + 56.8
which is just
y = 56.8

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by