That is all the code... it's written in matlab... ever heard of it? If you can't answer the question no need to be nasty.

Yes I have heard of Matlab but I do not recognise the code. A simple "this is my Matlab code" would have been so much better instead of assuming that everyone knows what Matlab code looks like.

This is an Arduino Forum not a Matlab Forum.

Do not assume that everyone knows what you do we are not mind readers here.

people on this forum can be real sassy though !

We can with people who ask for help without the common curtsey of bothering to read the "How to use this forum" sticky post and then getting shirty when it is pointed out to them.