For anyone checking this: The solution is simpler than I thought. By loading a file into Octave:
load("filename.ext");
Octave automatically saves it in the variable "y". This is because Octave can import variables from the .mat file. When loading the file Octave sees the name of the column and the vectors, so it automatically imports the data inside the variable.
s = load("T01DATA.mat"); #Making this whole code unnecessary)
In order to get the .wav file from the .mat you can only implement wavwrite() with "y" and everything will be perfect.
wavwrite(y,Fs,"out.wav");
This will create the out.wav inside the folder you are working. You can check it with
pwd