matlab数据处理函数

 

 

function [ k0,k_s_value,k_e_value ]  = ZZT_1( result1_avg )
%UNTITLED5 此处显示有关此函数的摘要
%   此处显示详细说明
% for index_1 = result1_avg
%     disp(index_1);
% end;
step1 = 10;

first1 = false;
k0=1;

for index_1 = 1:length(result1_avg)-step1
    index1_value = result1_avg(index_1);
    index5_value = result1_avg(index_1+step1);
    k = (index5_value - index1_value)/step1;
    if k<0.00001 & index_1>100 & first1 == false
        %disp(index_1);
        k0 = index_1;
        first1 = true;
    end;
    %disp(k);
end;



index_k = k0;
k_s_value = 0.0;
k_e_value = 0.0;

index_value = result1_avg(index_k);
index_s_value = result1_avg(1);
index_e_value = result1_avg(length(result1_avg));


k_s_value = (index_value - index_s_value)/(index_k - 1);
k_e_value = (index_e_value-index_value)/(length(result1_avg) - index_k);




end

 

 

################

posted @ 2023-01-01 20:08  西北逍遥  阅读(44)  评论(0编辑  收藏  举报