write code to solve model y = c1*x + c2*ex , and plot the results of the model with a line and the data with black x’s. in matlab
main.m
% Generate some sample datax = [12345];
y = [3.45.17.29.512.2];
% Fit the model y = c1*x + c2*exp(x)X = [x' exp(x')];
coefficients = X\y'; % Solve for model coefficients% Generate model valuesxModel = 0:0.01:6;
yModel = coefficients(1)*xModel + coefficients(2)*exp(xModel);
% Plot the modelplot(xModel, yModel, 'b-'); % Blue line for the modelhold on
% Plot the dataplot(x, y, 'kx', 'MarkerSize', 10); % Black x's for the data pointsxlabel('X');
ylabel('Y');
legend('Model', 'Data');