i m getting error while running code

1 次查看(过去 30 天)
Pradeep R B
Pradeep R B 2021-6-20
编辑: DGM 2021-6-20
i found below error ..please anyone give solution
??? Undefined function or method 'rms' for input arguments of type 'uint8'.
Error in ==> DetectDisease_GUI>pushbutton4_Callback at 227
RMS = mean2(rms(seg_img));
Error in ==> gui_mainfcn at 96
feval(varargin{:});
Error in ==> DetectDisease_GUI at 46
gui_mainfcn(gui_State, varargin{:});
Error in ==>
@(hObject,eventdata)DetectDisease_GUI('pushbutton4_Callback',hObject,eventdata,guidata(hObject))
??? Error while evaluating uicontrol Callback

回答(1 个)

DGM
DGM 2021-6-20
编辑:DGM 2021-6-20
rms() is part of the signal processing toolbox. Do you have SPT?
If not, you can always define your own function that does the same thing (for the specific syntax being used).
As an anonymous function within the existing code:
rms = @(x) sqrt(mean(x.^2));
Or as an external function file like the one attached. SPT rms() supports other things which don't appear to be used in your case, so this is just simplified implementation.

类别

Help CenterFile Exchange 中查找有关 Images 的更多信息

产品


版本

R2009a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by