getSlope function issues for MATLAB code
I am trying to run this program in MATLAB R2024a but getting errors:
https://www.mathworks.com/matlabcentral/fileexchange/47605-creating-a-motion-detector-using-an-arduino-a-photoresistor-and-matlab
I might just be reading the code wrong but it looks like this script used a function ‘getSlope’ on line 93 of the ‘Run_Motion_Detector’ function. When I try to run this code it displays an error saying it (getSlope) is an undefined function or variable. Am I missing this function in an update or has it been replaced by a recent update? Is there an equivalent function in MATLAB I can code as a substitute ? The code’s authors states:
Slope Method – calculates a best-fit linear slope for a window of data. Requires both the voltage readings and their corresponding timestamps.I am trying to run this program in MATLAB R2024a but getting errors:
https://www.mathworks.com/matlabcentral/fileexchange/47605-creating-a-motion-detector-using-an-arduino-a-photoresistor-and-matlab
I might just be reading the code wrong but it looks like this script used a function ‘getSlope’ on line 93 of the ‘Run_Motion_Detector’ function. When I try to run this code it displays an error saying it (getSlope) is an undefined function or variable. Am I missing this function in an update or has it been replaced by a recent update? Is there an equivalent function in MATLAB I can code as a substitute ? The code’s authors states:
Slope Method – calculates a best-fit linear slope for a window of data. Requires both the voltage readings and their corresponding timestamps. I am trying to run this program in MATLAB R2024a but getting errors:
https://www.mathworks.com/matlabcentral/fileexchange/47605-creating-a-motion-detector-using-an-arduino-a-photoresistor-and-matlab
I might just be reading the code wrong but it looks like this script used a function ‘getSlope’ on line 93 of the ‘Run_Motion_Detector’ function. When I try to run this code it displays an error saying it (getSlope) is an undefined function or variable. Am I missing this function in an update or has it been replaced by a recent update? Is there an equivalent function in MATLAB I can code as a substitute ? The code’s authors states:
Slope Method – calculates a best-fit linear slope for a window of data. Requires both the voltage readings and their corresponding timestamps. getslope, slope, matlab, arduino, motion detector, photoresistor MATLAB Answers — New Questions