Help with plotting needed!

1 回表示 (過去 30 日間)
cocopuffs
cocopuffs 2014 年 7 月 29 日
編集済み: cocopuffs 2014 年 7 月 29 日
Hello all.
I have 100 element cell array, and each element represent a lund cell. Each element in cell array is av matrix of 1X1000 of intensities (each element in this matrix is the data recording per hour). I want to plot each lund cell (100 of them) on a raster plot with x as the time axis and the lund cell # on the y-axis.
I am not sure how to plot all the matrices of all 100 cells using imagesc and was wondering if I could please have some urgent help. Thank you in advance.

採用された回答

Geoff Hayes
Geoff Hayes 2014 年 7 月 29 日
編集済み: Geoff Hayes 2014 年 7 月 29 日
Assuming that the intensities are numeric and that each element in the cell array is a matrix of 1x1000 dimension, then why not just concatenate all of the data together into a 100x1000 matrix, where each row in the matrix is the 1000 intensities for a single lund cell?
lundCellData = zeros(100,1000);
for k=1:100
lundCellData(k,:) = cellArray{k}; % cellArray is the 1x100 element cell array
end
And then just use imagesc to plot the data
imagesc(lundCellData);
This will plot the time data along the x-axis, and the lund cell numbers along the y-axis.
Try the above and see what happens!
  1 件のコメント
cocopuffs
cocopuffs 2014 年 7 月 29 日
編集済み: cocopuffs 2014 年 7 月 29 日
Thank you so much, this is exactly what I was looking for! I appreciate the quick response :)

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImages についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by