Task c started

variables and function calls fixed. implementation is still missing in
segmentation.m