Matlab, how to create non linear curve from random data?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
example i have data
x=linspace(4,6,7) %data x from 4 until 6 with 7 elements
y=linspace(8,17,7)
i will create hiperbolik data or non linear randomly in matlab
0 comentarios
Respuestas (1)
Walter Roberson
el 22 de Abr. de 2012
curvedegree = 2; %set as desired
coeffs = polyfit(x, y, curvedegree);
plot(x, polyval(coeffs, x)); %plot fitted y
2 comentarios
Jan
el 23 de Abr. de 2012
Because you fit a parabola to a line.
Where are the random data you are talking of in the subject line?
What about: y = rand(size(x))?
Ver también
Categorías
Más información sobre Interpolation 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!