finding matrix base on linear equation
조회 수: 1 (최근 30일)
이전 댓글 표시
hello,
given a linear quation, y=ax+b y=-0.15x-21.3, how can find a matrix for y=Ax?
thanks
댓글 수: 0
답변 (1개)
Star Strider
2022년 1월 18일
I’m not certain what the desired result is here.
Try this —
x = linspace(-10, 10, 5);
y = -0.15*x-21.3;
X = [x(:), ones(size(x(:)))] % Design Matrix
Coefficients = X \ y(:) % Proof
.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!