With this script you can represent and customize altitude profiles from .gpx files using Matlab. To smooth the profile, the Moving mean function is used. It's important to select the length of the moving mean window based on the GPS signal quality through the window_percent parameter. This parameter represents the window length as a percentage of the total number of GPS samples.
Some examples to compare the effect of varying the parameter window_percent:
Final examples of elevation profiles from my Wikiloc Routes
https://es.wikiloc.com/rutas-senderismo/selaya-picones-de-sopena-castro-valnera-bajada-a-vega-de-pas-desde-el-alto-de-estacas-de-trueba-sel-57011719
https://es.wikiloc.com/rutas-senderismo/pandillo-castrovalnera-lunada-picondelfraile-covalrruyo-fincadelrey-portilloelcijo-lavara-cascadade-73922005
https://es.wikiloc.com/rutas-senderismo/sanroque-porracolina-picondelfraile-piconesdecallejaalbira-sanroque-69089035
https://es.wikiloc.com/rutas-senderismo/valdeason-mosquiteru-porracolina-ason-mortillano-penarocias-valdeason-72540252
https://es.wikiloc.com/rutas-senderismo/el-canto-la-lluela-valdicio-porracolina-pizarras-pico-veinte-lunada-pico-la-miel-canal-de-valbuena-120774650
https://es.wikiloc.com/rutas-senderismo/bernallan-portillo-el-cijo-castro-valnera-el-bernacho-pico-la-miel-lunada-picon-del-fraile-pico-vei-123025667
https://es.wikiloc.com/rutas-senderismo/bustantegua-las-mazas-sopena-castro-valnera-valbuena-la-zamina-bustantegua-123253959
https://es.wikiloc.com/rutas-senderismo/losbarrios-ajanedo-bustablao-losmachucos-porracolina-calseca-losbarrios-144384091