Dear sama,
ckeck the documentation of the surf function or the scatter3 function.
https://ch.mathworks.com/help/matlab/ref/surf.html?searchHighlight=surf&s_tid=doc_srchtitle https://ch.mathworks.com/help/matlab/ref/scatter3.html?searchHighlight=scatter3&s_tid=doc_srchtitle
Best, Sandro