How to plot a mean value

조회 수: 6 (최근 30일)
santosh
santosh 2011년 3월 3일
I m doing a project which involves following code and i need to plot the mean value
b=diff(ind); %find differences idx=find(b>1); %find their indexes idx=[idx;numel(ind)]; %add the last value as index cel=cell(1,numel(idx)); %make a cell to hold the groups sv=1; %start value for f=1:numel(idx) cel{f}=ind(sv:idx(f)); %take each part of a into a group sv=idx(f)+1; %make the next start value end cellfun(@mean,cel)
  댓글 수: 1
Matt Tearle
Matt Tearle 2011년 3월 3일
please format your code!

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2011년 3월 3일
As I wrote in another of your questions:
What do you want to plot against?
plot(cellfun(@mean, cel))
perhaps?
We need to know what values you want on the X axis.

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by