Solving linear functions with matrix
5 次查看(过去 30 天)
显示 更早的评论
Suppose it is known that the graph of the function 𝑦(𝑥)=𝑎𝑥3+𝑏𝑥2+𝑐𝑥+𝑑 passes through four given points (𝑥𝑖,𝑦𝑖),where 𝑖=1,2,3,4. Write a user-defined function that accepts these four points as input and computes the coefficients 𝑎, 𝑏, 𝑐, and 𝑑. The function should solve four linear equations in terms of the four unknowns a, b, c, and d. Test your function for the case where 𝑐𝑜𝑜𝑟𝑑=[−2,−20; 0,4; 2,68; 4,508] , whose answer is 𝑎=7, 𝑏=5, 𝑐=−6, and 𝑑=4. Plot the function as a solid UoP purple line and the coord points as UoP blue triangular markers with no line on the same axis. Label and format the graph.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Calculus 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!