Get array from a function
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
TTA
el 15 de Dic. de 2022
Movida: Walter Roberson
el 15 de Dic. de 2022
I have this matlab code below and the result is attached.
please I need to get the red line in the attached figure in a form of array
[x, y] = titanium;
gEqn = 'a*exp(-((x-b)/c)^2)+d';
startPoints = [1.5 900 10 0.6];
[fj,gof,output] = fit(x',y',gEqn,'Start', startPoints, 'Exclude', [1 10 25]);
plot(fj,x,y)
Thanks
0 comentarios
Respuesta aceptada
Walter Roberson
el 15 de Dic. de 2022
Movida: Walter Roberson
el 15 de Dic. de 2022
[x, y] = titanium;
gEqn = 'a*exp(-((x-b)/c)^2)+d';
startPoints = [1.5 900 10 0.6];
[fj,gof,output] = fit(x',y',gEqn,'Start', startPoints, 'Exclude', [1 10 25]);
xmin = min(x);
xmax = max(x);
NumberOfPoints = 250;
xfit = linspace(xmin, xmax, NumberOfPoints);
yfit = fj(xfit);
That is, if you use the cfit object as-if it is a function, then it accepts values of the independent variable and returns corresponding fitted values.
1 comentario
Más respuestas (0)
Ver también
Categorías
Más información sobre Signal Integrity Kits for Industry Standards en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!