Hello,
When the code starts, you run the following command:
clear all
This command deletes your data in the Matlab workspace. Nowhere in your code do you import the .mat file of your signal. So there is nothing that the code can do due to missing data ...
Either you do it this way (provided you have previously inserted the data in the Matlab workspace):
%clear all
or you type an additionally line of code after your 3 cleaning-commands as follows:
load ('name_of_your_data_file.mat')
whatever the name of your file is.
After doing that, the data is loaded into the Matlab workspace and your code works on my Matlab.
best regards
Stephan
