You can keep things quite simple. Import your stock data, create two variables, one - let's call it D - that contains the dates, and one - let's call it Prices - that contains the stock prices. D is a column vector and X is a matrix. Then you can calculate the returns with the following command:
Returns = diff(log(X))
For a lot of applications that is enough. Sometimes, however, it is advisable to use a fints object. When working with financial data, use fints instead of timeseries. By the way in Matlab you cannot specify something as a time series. With the function timeseries you create an object timeseries