If you need to do this client-side and cant run the Matlab script the API can be used
see https://au.mathworks.com/help/thingspeak/get-channel-field-feed.html for the details but the basic API call is something like
https://api.thingspeak.com/channels/9/fields/1.csv?results=30
(You may have to include api_key if your channel is not public).
Unfortunately there is no way to only read the 30th value ago on its own. You can only read all 30 values and pick the one you want.