Could someone please explain me this code?
Mostra commenti meno recenti
x = linspace(min([x1,x2],[],2), max([x1,x2],[],2))
y1 = interp1(x1, y1, x, 'pchip','extrap')
y2 = interp1(x2, y2, x, 'pchip','extrap')
index = find(diff(sign(y1-y2)))
for k = 1:numel(index)
indexrange = max(1,index(k)-2) : min(numel(x),index(k)+2);
xi(k) = interp1(y1(indexrange)-y2(indexrange), x(indexrange), 0);
yi(k) = interp1(x(indexrange), y1(indexrange), xi(k));
end
Xc = [xi; yi]
Could you please explain me all the steps of this code?
Risposta accettata
Più risposte (1)
Anitha Limann
il 17 Ott 2021
0 voti
Categorie
Scopri di più su MATLAB in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!