function [fitresult,gof] = createFit(x,y)
[xData,yData] = prepareCurveData( x,y); % set fittype and options.
ft = fittype(' gauss 1 ');
Opts = fitoptions( 'Method',' nonlinear least square');
opts。 Display = ' Off
opts。 lower =[-Inf-Inf 0];
opts。 start point =[y(ceil(length(x)/2))x(ceil(length(x)/2))0. 1]; % make the model conform to the data.
[fitresult,gof] = fit( xData,yData,ft,opts); Percentage of drawings that match the data.
h = plot( fitresult,xData,y data);
xlabel('β');
y label(' R ');
Legend off
Grid open; Hold on;
plot(fitresult.b 1,fitresult.a 1,'^','markersize',6)
Run it, and then enter: createFit(x, y) in the command line window.
1. What are the main courses of communication engineering?
Hello, the communication engineering major belongs to the electronic information major under the