Find minimum of a 15x100 and return in a vector of 1x100. is this possible?
조회 수: 1 (최근 30일)
이전 댓글 표시
I have
i=5 ; nu=150 ;
for j =1:15
load(['output/GC/rank_', int2str(i), '/nu_',int2str(nu),'/NeNMF_GC_', int2str(j), '.mat'], ...
'RRE_AS_V' );
newAS (j,:)= (RRE_AS_V);
end
The variable newAS is 15 x 101 in size. if i do a median it works fine. It returns a 1x101
Median_newAS = median(newAS,1);
However wheni do for min and max it appears the values are swapped when i write to a table
% however for min and max
Min_newAS = min(newAS);
Max_newAS = max(newAS);
I write to a table. but when i examin my min values they look like they are rather the max values. and max values are small
T_AS=table(Min_newAS',Max_newAS',Max_newAS' ,'VariableNames',{'Min_AS','Med_AS','Max_AS'});
namedatfile= ['r_' int2str(i),'_nu_' int2str(nu) '_pass.dat'];
fname = namedatfile;
writetable(T_AS,fname,'Delimiter',' ')
댓글 수: 0
답변 (1개)
Matt J
2020년 2월 18일
편집: Matt J
2020년 2월 18일
The names of the variables you wrote to the table
Min_AS,Med_AS,Max_AS
are different from the original variable names you showed us,
Median_newAS
Min_newAS
Max_newAS
So, it wouldn't be a surprise if the data you wrote to the table was different from what you computed.
댓글 수: 2
Matt J
2020년 2월 18일
I suggest you attach newAS in a .mat file, so we can try to reproduce what you see.
참고 항목
카테고리
Help Center 및 File Exchange에서 Tables에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!