Need help. I want to read the topography file into MATLAB as an array and make an image?

1 view (last 30 days)
Hello Matlab experts,
How do I read the topography file into MATLAB as an array and make an image? Can I make an illuminated image by using the Matlab function diff()?
Thank you.
  5 Comments
JC
JC on 27 Apr 2019
Edited: JC on 27 Apr 2019
Not sure if this would work? I also want to set the limits of the imagesc plot to [-1000,1000].
-----------------------------------------------------------------------------------------------------
load the topography image into matlab
%
fid=fopen('lajolla_swab','r');
topo=fread(fid,[3240,1440],'int16')';
%
% image the topography
%
imagesc(topo);
xlabel("x-axis")
ylabel("y-axis")
title("Topography of La Jolla Shores")
%
% illuminate the topography
%
diff(topo)

Sign in to comment.

Answers (0)

Categories

Find more on Images in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!