Printing timesteps over raster data series.

3 ビュー (過去 30 日間)
Marlon Calispa
Marlon Calispa 2015 年 1 月 2 日
コメント済み: Image Analyst 2015 年 1 月 5 日
I am running some loops through one raster series, for every timestep I determine a new 'Fodder' raster and I visualize it using 'imagesc' I would like to know if there is any way to plot the current raster and its respective timestep (t=1:2080) to see the evolution of 'Fodder' through time.
Kind regards.

採用された回答

Image Analyst
Image Analyst 2015 年 1 月 2 日
You can use title:
caption = sprintf('Image #%d', k);
title(caption, 'FontSize', 30);
Or you can use text():
text(x, y, caption);
Or you can use the test inserter function in the Computer Vision System Toolbox.
  3 件のコメント
Marlon Calispa
Marlon Calispa 2015 年 1 月 5 日
Finally I used: title(sprintf('Whatever: %i', timestep))
Thanks!
Image Analyst
Image Analyst 2015 年 1 月 5 日
You're welcome. That is what I thought. k is whatever number you want - it can be timestep if that's what you called it. I think usually people use %d for integers and %f for floating point numbers. Personally I usually don't like to embed function calls inside function calls. I think it makes it easier to read, follow, and maintain if they're separate, but that's your choice.

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by