Hi,
A channel on thingSpeak can be updated at the fastest rate of once every 15 seconds (free account) or once every 1 second (paid account). This limit is enforced even if multiple independent sources/clients are writing to the same thingSpeak channel at different rates. With this is mind, could you confirm that the MATLAB code that you have shared above is the only source writing to channel 242517?
Note that the update rate limit is enforced even if you are writing to different fields at different rates. Consider the following example for the free account case: on channel 242517, if fields 1 and 2 are being updated once every 15 seconds from one client/MATLAB function and fields 3 and 4 are being updated once every 30 seconds by another client/MATLAB program, you might see an error because channel 242517 might get two updates in less than 15 seconds.
Let us know if you are still seeing an error after ensuring that there is only one client/MATLAB program writing to your channel.
- Adarsh