Jet function output error

조회 수: 1 (최근 30일)
WizKing
WizKing 2018년 7월 29일
댓글: Walter Roberson 2018년 8월 4일
I got a script that is to create a flux map using two images; image of reflected rays and image of the sun. The inital lines make sense and produce an output but the total result is null (the is no flux map) after running it. I realized the
jet (ceil (max(fmap_img(:)))
did not produce anything. Any help?
  댓글 수: 4
Walter Roberson
Walter Roberson 2018년 7월 29일
You can attach the script.
WizKing
WizKing 2018년 7월 30일
@Walter Robertson. Okay

댓글을 달려면 로그인하십시오.

답변 (1개)

Image Analyst
Image Analyst 2018년 7월 30일
편집: Image Analyst 2018년 7월 30일
You must pass Jet an integer that is the number of colors it is supposed to create.
Try this:
numberOfColors = ceil (max(fmap_img(:))) % No semicolon
cmap = jet(numberOfColors) % Create a color map.
colormap(cmap); % Apply the colormap to the indexed/gray scale image.
What do you see in the command window? Does the image look pseudocolored now?
You might also want to look into caxis().
  댓글 수: 6
WizKing
WizKing 2018년 8월 3일
편집: Walter Roberson 2018년 8월 4일
Okay please I have done that.
Also, after the colormap() call. I want to create a surface that looks like:
[X,Y] = meshgrid(-8:.5:8);
R = sqrt(X.^2 + Y.^2) + eps;
Z = sin(R)./R;
% surface in 3D
figure;
surf(Z,'EdgeColor','None'); view(2)% surface in 2D
Using the colormap() output in the script. So that the red will be the centre color (peak), followed by yellow up to blue in a concentric circular transition.
Walter Roberson
Walter Roberson 2018년 8월 4일
colormap(jet)
after the above code would produce that effect.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Orange에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by