Finding a parabolic function having two known points and curve shape
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Rafael Pereira de Resende Freitas
am 17 Okt. 2018
Kommentiert: Rafael Pereira de Resende Freitas
am 18 Okt. 2018
Hi,
I want to build a vector y that follows a parabolic function having two sets of points: (1,0.03) and (n,0), being n a variable that is defined earlier in my code. This means that the vector indexes go from 1 to n, being y(1) = 0.03 and y(n) = 0.
The curve must look like this (pardon my sloppy Paint skills):

I thought of creating a for loop, but don't know what to put inside it. Something like:
for i = 1:n
y(i) = %(insert polynomial function which I can't figure out here)
end
Any thoughts?
Thanks!
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Curve Fitting Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!