【发布时间】:2017-05-06 22:18:43
【问题描述】:
这段代码(几乎)可以满足我的要求,但我不明白它怎么会这么简单。那么有人可以解释一下这段代码是如何工作的吗?
FIY,weather1618 是一个 384x384 数组,范围从 -76 到 -30。而 maxv 的值为 -30。
mapped_array = uint8((double(weather1618) ./ maxv) .* 50);
image(mapped_array);
为什么 .*50 .*100 给出不同的图像但 .*100 .*500 .*1000 是相同的?
如果我直接做的话,
image(weather1618);
我只会得到一张蓝色的图像。
【问题讨论】:
-
class(weather1618)返回什么? -
如果该行唯一要做的就是为
image准备数据,那么您可以将其完全替换为imshow(weather1618,[])或imagesc(weather1618) -
@codeaviator 'double'
标签: arrays image matlab matlab-figure uint8t