📄 m_hysteresis.m
字号:
function hysteresis=M_hysteresis(Xu,Yu,Xd,Yd)
%函数输入:正、反行程的各个测点的输入输出数组 函数输出:迟滞
%Yfs采用直接用MaxY-MinY的方式,所以函数结果与输入的量程有关!!!
%ps: 实际上没有用Xu,Xd
DltY=abs(Yu-Yd)
MaxDltY=max(DltY)
%计算Yfs
MinY=min(min(Yu),min(Yd))
MaxY=max(max(Yu),max(Yd))
Yfs=MaxY-MinY
hysteresis=MaxDltY/(2*Yfs)
%如果要对多次试验计算,则输入2维数组,可以采用mean函数改写程序,方法如下
% Example: If X = [0 1 2
% 3 4 5]
% then mean(X,1) is [1.5 2.5 3.5] and mean(X,2) is [1
% 4]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -