For the case of multiple lines with different colors, wmline expects each line to be a separate element of a geoshape vector. The code below would create a geoshape where each lat, lon segment is a separate line.
s = geoshape; for ii = 1:(length(lat - 1)) s(ii).Latitude = [lat(ii),lat(ii+1)]; s(ii).Longitude = [lon(ii),lon(ii+1)]; s(ii).Altitude = [alt(ii),alt(ii+1)]; end
As written above, you'll have one too many colors since there is one fewer line segments then there are points. The following line will plot your data using all but the last color.
wmline(s,'Color',rgb(1:end-1,:))