第一句子网 - 唯美句子、句子迷、好句子大全
第一句子网 > 用matlab求excel表中平均值 matlab如何将符合特定条件的数据导入excel并求出平均值...

用matlab求excel表中平均值 matlab如何将符合特定条件的数据导入excel并求出平均值...

时间:2021-02-03 01:49:15

相关推荐

用matlab求excel表中平均值 matlab如何将符合特定条件的数据导入excel并求出平均值...

matlab如何将符合特定条件的数据导入excel并求出平均值

% outline %step_1 clear %step_2 CurrentWorkingPaht %step_3 a Matrix_r %step_4 Loop getting the 20 close and far values %step_5 writing the Matrix_r into the Excel % clear clc;clear; % currentworkingpath CurrentWorkingPath = fileparts(mfilename( fullpath )); Filename_result = [ result_selectionA_1.txt ]; % set a Matrix_r Matrix_r = zeros(20,2); for i = 1:20 tmpPathname = sprintf( %s\\sub%d\\%s ,CurrentWorkingPath,i,Filename_result); [Col_1 Col_2 Col_3 Col_4 Col_5 Array_type Array_RTs Array_ACC] = textread(tmpPathname, %d%d%d%d%d%d%d%d , delimiter , ); doubleC_Mat = [Array_type Array_RTs]; Matrix_r(i,1) = mean(doubleC_Mat(doubleC_Mat(:,1)12,2)); end % writing into the excel file success = xlswrite( student_update.xls , Matrix_r, sheet1 , B2 ); Series = 1:20; Series = Series ;Conditionnames = {[ student_ID ] [ Close ] [ Far ]}; success = xlswrite( student_update.xls , Series, sheet1 , A2 ); success = xlswrite( student_update.xls , Conditionnames, sheet1 , A1 );

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。