Least Square Linear Approximation
显示 更早的评论
Hi,
Based on the least square linear approximation, use this to fit a the function y = aln(x) + bcos(x) + ce^x to the data below. Find a, b, and c.
x=[0.24, 0.65, 0.95, 1.24, 1.73, 2.01, 2.23, 2.52, 2.77, 2.99];
x=x'; %Transposes x%
y=[0.23, -0.26, -1.10, -0.45, 0.27, 0.10, -0.29, 0.24, 0.56, 1.00];
y1=[log(x) cos(x) exp(x)]
When I run this code it gives me a 3x10 matrix, how do I find the value of a, b and c (each one should have one value)?
Thank you so much in advance!
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Linear Algebra 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!