Solving linear functions with matrix
1 view (last 30 days)
Show older comments
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.
Answers (0)
See Also
Categories
Find more on Line Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!