Your y variable clearly doesn't have 52 elements in it. Or z doesn't have 102.
Without showing us your variables, how are we supposed to help?
Try running whos or size(y) or size(z).
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!