필터 지우기
필터 지우기

how can i find the mean and standard deviation of a plot????

조회 수: 3 (최근 30일)
Ruby
Ruby 2014년 2월 15일
댓글: Ruby 2014년 2월 16일
sir.... with this code i find out the notch and low pass response of a given data.... how can i find the standard deviation and mean of the plot????
fid = fopen('filename.txt'); datacell= textscan(fid,'%f%f%f%*[^\n]',... 'delimiter','\t'); fclose(fid); A = datacell{2}; B=datacell{3}; C=A-B; A1= squeeze( sum( reshape(A, 40, [], 1) ) ); B1=squeeze( sum( reshape(B, 40, [], 1) ) ); C1=A1-B1; subplot(3,1,1); stem(C1); b=[0.69977431651797461 -0.1814575955924495 1.4113120181091672 -0.18145759559244945 0.69977431651797473]; a=[1 -0.21440197757618362 1.3190484139225416 -0.148513213608716 0.491812237222576]; y =filter(b,a,C1); subplot(3,1,2); stem(y); d=[0.0000089848614639706426 0.0000035939445855882617 0.0000053909168783823964 0.0000035939445855882685 0.00000089848614639706807] e=[1 -3.8358255406473472 5.5208191366222277 -3.5335352194630145 0.8485559996647685] z=filter(d,e,C1); subplot(3,1,3); stem(z);

채택된 답변

dpb
dpb 2014년 2월 15일
It would be much simpler if you followed the suggestions IA has given, but since each subplot seems to be a stem of some variable, the answer would seem to be that you would consult
doc mean
doc std
and apply them to the various variables which you in turn plotted. That seems so patently obvious however that surely there's more to the question than that????

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by