uploading sketch errs out "was not declared in scope"

I am attempting to follow this tutorial (upload temp data to thingspeak) Mathworks: http://tinyurl.com/yya2xpet

However, I am getting the following message when uploading to the board (I have tried several versions of thingspeak.h, thinking the version used might be the reason for the error but the problem persists. I am not sure what I should add under global to satisfy the error.):

Arduino: 1.8.5 (Linux), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, 4M (1M SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200"

sketch_apr10a.ino: In function 'void setup()':
sketch_apr10a:38: error: 'readTSData' was not declared in this scope
 aConst = readTSData( channelID, aField );
                                        ^
sketch_apr10a.ino: In function 'void loop()':
sketch_apr10a:58: error: 'write2TSData' was not declared in this scope
         write2TSData( channelID , dataFieldOne , celsiusTemperature , dataFieldTwo , fahrenheitTemperature , dataFieldThree , millis() );      // Write the temperature in F, C, and time since starting.
                                                                                                                                        ^
exit status 1
'readTSData' was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Sketch used:

Code used

#include <ThingSpeak.h>
#include <ESP8266WiFi.h>

// Network Parameters
const char* ssid     = "xxxx";
const char* password = "xxxx";

// ThingSpeak information
char thingSpeakAddress[] = "api.thingspeak.com";
unsigned long channelID = xxx;
char* readAPIKey = "xxx";
char* writeAPIKey = "xxxx";
const unsigned long postingInterval = 120L * 1000L;
unsigned int dataFieldOne = 1;                            // Field to write temperature data
unsigned int dataFieldTwo = 2;                       // Field to write temperature data
unsigned int dataFieldThree = 3;                     // Field to write elapsed time data
unsigned int aField = 6;                             //Field to hold first constant of the thermistor calibration                
unsigned int bField = 7;                             //Field to hold second constant of the thermistor calibration
unsigned int cField = 8;                             //Field to hold third constant of the thermistor calibration

// Global variables
// These constants are device specific.  You will need to get them from the manufacturer or determine them yourself.
float aConst = 2.25E-02;   
float bConst = -0.003422894649;
float cConst = 0.00001518485044;

unsigned long lastConnectionTime = 0;
long lastUpdateTime = 0; 
WiFiClient client;                                  

void setup() {

Serial.begin(9600);
Serial.println("Start");
connectWiFi();

// Read the constants at startup.
aConst = readTSData( channelID, aField );
bConst = readTSData( channelID, bField );
cConst = readTSData( channelID, cField );
}

void loop() {
    
    // Only update if posting time is exceeded
    if (millis() - lastUpdateTime >=  postingInterval) {
        
        float fahrenheitTemperature, celsiusTemperature;
        
        lastUpdateTime = millis();
        
        float readValue = analogRead(A0);
        float logR = log( 10000 * ( 1024 / readValue - 1 ));                 // Separate the calculation for simplicity and debugging
        
        celsiusTemperature = 1 / ( aConst + bConst * logR + cConst * pow(logR,3) ) - 273.15;   // Calculate the temperature in Celsius
        fahrenheitTemperature = celsiusTemperature * 9 / 5 + 32;
        Serial.println("ADC =  " + String( readValue )+ " Temp = "+String( fahrenheitTemperature ));
        write2TSData( channelID , dataFieldOne , celsiusTemperature , dataFieldTwo , fahrenheitTemperature , dataFieldThree , millis() );      // Write the temperature in F, C, and time since starting.
    }
}

int connectWiFi(){
    
    while (WiFi.status() != WL_CONNECTED) {
      
        WiFi.begin( ssid, password );
        delay(2500);
        Serial.println("Connecting to WiFi");
    }
    
    Serial.println( "Connected" );
    ThingSpeak.begin( client );
}

Please remove this question. I missed part of the sketch when copying.