MATLAB Answers

Standard deviation across plots

28 ビュー (過去 30 日間)
Sharah 2016 年 2 月 15 日
回答済み: Arnab Sen 2016 年 2 月 23 日
I am trying to do an analysis where I would need to analyse the consistency across trials: refers to the first picture below. Each line represents one trial. There are 9 to 11 trials altogether. I want to plot the average value between the lines as well as plotting and calculating the standard deviation across trial (so that there will be one average trial value and shaded grey area which represent the distribution of data).
Any idea on how to do this?
  4 件のコメント
Sharah 2016 年 2 月 15 日
the problem is i do not have the same data size for each line.



Arnab Sen
Arnab Sen 2016 年 2 月 23 日
Hi Sarah,
You can take the approach described by Yona in earlier comments. If you don't have same number of data in all the vectors as you mentioned, you can use in built 'interp1' function to interpolate the missing values for shorter vector. The syntax is as below:
>>vq = interp1(x,v,xq)
where 'x' is the vector of x axis coordinates and 'v' is the vector corresponding values and 'xq' is the query point.
For more detail about 'interp1', refer to following link:

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by