how can i compute std 2d
6 次查看(过去 30 天)
显示 更早的评论
Hi
iwould like to ask how can i obtain std along all the rows and columns as culored image that explain the values of std
the matrix dimension is 51 71 any suggestion ?
thanks
2 个评论
回答(1 个)
Walter Roberson
2022-2-25
编辑:Walter Roberson
2022-2-25
data = randn(51, 71).*rand(51,71); %just some data
std_along_columns = std(data, [], 1); %one result for each column
std_along_rows = std(data, [], 2); %one result for each row
std_overall = std(data(:)); %over entire array
whos
2 个评论
Walter Roberson
2022-2-25
You cannot. std means standard deviation which is property of groups of data, not of individual points. For example you can take the standard deviation along the rows and do a line plot of that.
In order to have a 2 dimension array of standard deviation results, you would have need to have started with a 3D array. For example,
cmap = flipud(hot(64));
data = sort(randn(51, 71, 83) .* rand(51, 71, 83),1); %just some data
s = std(data, [], 3);
imagesc(s); colormap(cmap)
colorbar()
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Discrete Data Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!