i corrected the code like you said. still this message is showing for these two lines "Subscript indices must either be real positive integers or logicals.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.