how can i compute the stander diviation and confidence intervales for a matrix?

1 回表示 (過去 30 日間)
RADWAN A F ZEYADI
RADWAN A F ZEYADI 2022 年 1 月 15 日
コメント済み: the cyclist 2022 年 1 月 18 日
i have matrix 51 rows and71 columns and i would like to compute and plot the result of std also i need to compute the confidence intervals 95%?
also after computing the std can i use imagesc command in order to see the range of std for the matrix ?
thank you

回答 (1 件)

the cyclist
the cyclist 2022 年 1 月 15 日
If you have the Image Processing Toolbox, you can use the std2 function to compute the standard deviation of all the elements of a matrix. If not, you can use std from base MATLAB, but you need to make a vector out of the matrix first.
A = magic(5);
std2(A)
ans = 7.3598
std((A(:)))
ans = 7.3598
Sorry, but I didn't really understand your second question.
  9 件のコメント
RADWAN A F ZEYADI
RADWAN A F ZEYADI 2022 年 1 月 18 日
thank you but they are 2 vectors so can i compute for both of them sementanuesly?
the cyclist
the cyclist 2022 年 1 月 18 日
N = 1000;
X1 = randn(N,1);
X2 = randn(N,1) + 100;
X = [X1, X2];
x_lower = prctile(X, 2.5)
x_lower = 1×2
-1.9542 97.9812
x_upper = prctile(X,97.5)
x_upper = 1×2
1.9782 101.7530
Here I have defined two vectors (of equal length), put them into a matrix, and calculated the confidence interval for both vectors simultaneously.

サインインしてコメントする。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by