send multiple serial data from arduino to matlab

i found this thread but the code didn't work

You wrote some code. It did something.
You expected the code to do something.

All we can tell is that what it did was not what you wanted. Since you've not told us what it did, or how that differs from your expectations, you are on your own. Good luck.