フィルターのクリア

Histogram visualization for Spatio-temporal data stored in a cell array.

2 ビュー (過去 30 日間)
siddharth rawat
siddharth rawat 2017 年 2 月 5 日
コメント済み: Image Analyst 2017 年 2 月 9 日
I have a cell array (attached) of size 1X40; each cell is a double of size 110 X 120. this is a Spatio-temporal data. I would like to visualize histograms for each time interval by stacking these individual histograms.

回答 (1 件)

Image Analyst
Image Analyst 2017 年 2 月 5 日
Try this:
% Cleanup/initialization
clc; % Clear the command window.
close all; % Close all figures (except those of imtool.)
% clear; % Erase all existing variables. Or clearvars if you want.
workspace; % Make sure the workspace panel is showing.
format long g;
format compact;
fontSize = 20;
s = load('m1.mat')
m1 = s.m1
for k = 1 : length(m1)
thisData = m1{k};
[counts, binValues] = histcounts(thisData);
plot(binValues(1:end-1), counts, '-', 'LineWidth', 2);
hold on;
end
grid on;
caption = sprintf('Histogram of %d Arrays', length(m1));
title(caption, 'FontSize', fontSize, 'Interpreter', 'None');
xlabel('Data Value', 'FontSize', fontSize);
ylabel('Count', 'FontSize', fontSize);
% Set up figure properties:
% Enlarge figure to full screen.
set(gcf, 'Units', 'Normalized', 'OuterPosition', [0 0 1 1]);
% Get rid of tool bar and pulldown menus that are along top of figure.
set(gcf, 'Toolbar', 'none', 'Menu', 'none');
% Give a name to the title bar.
set(gcf, 'Name', 'Demo by ImageAnalyst', 'NumberTitle', 'Off')
  2 件のコメント
siddharth rawat
siddharth rawat 2017 年 2 月 9 日
編集済み: siddharth rawat 2017 年 2 月 9 日
Thanks, Image analyst for your answer, maybe my question is not so clear. I want to visualize this spatiotemporal data as following: https://www.mathworks.com/matlabcentral/answers/259767-3d-histgram-plot-for-n-m-matrix-visualize-result-monte-carlo-simulation
each histogram represents a temporal slice of the spatial data.
Image Analyst
Image Analyst 2017 年 2 月 9 日
So get your slice (single row or column) of your 2-D hist data (like you'd get from hist3), and then call bar()

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

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by