How to plot a mean value
6 views (last 30 days)
Show older comments
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)
Answers (1)
Walter Roberson
on 3 Mar 2011
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.
0 Comments
See Also
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!