finding matrix base on linear equation
2 次查看(过去 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!