Watch this Author's files
I got it working.
The idea lies in renaming the rainflow.m to rainflow_1.m or any other name. The demo script rfdemo1 then executes the rainflow.mex which is what is intended.
I am getting the problem as some have previously posted.
?? Attempt to execute SCRIPT rainflow as a function.
Error in ==> rfdemo1 at 35
Can you suggest how should I overcome this.