Question: MATLAB MATLAB MATLAB function [ Topograph , lowHighDist ] = generateTopographicalMap ( Altitude , Water ) [ m , n ] = size ( Altitude
MATLAB MATLAB MATLAB
function Topograph lowHighDist generateTopographicalMapAltitude Water
m n sizeAltitude;
Topograph zerosm n 'uint;
colors
; Blue Water
; Black Below Sea Level
; Green Up to meters
; Yellow to meters
; Orange to meters
; Red to meters
; White to meters
Cyan Above meters
;
land Altitude ~Water;
maxAlt maxland:;
minAlt minlandland ;
maxRow maxCol findland maxAlt;
minRow minCol findland minAlt;
lowHighDist sqrtmaxRow minRowmaxCol minCol;
for i :m
for j :n
if Wateri j
Topographi j :) colors :; Blue
elseif Altitudei j
Topographi j :) colors :; Black
elseif Altitudei j
Topographi j :) colors :; Green
elseif Altitudei j
Topographi j :) colors :; Yellow
elseif Altitudei j
Topographi j :) colors :; Orange
elseif Altitudei j
Topographi j :) colors :; Red
elseif Altitudei j
Topographi j :) colors :; White
else
Topographi j :) colors :; Cyan
end
end
end
TopographmaxRow maxCol, :) ; Magenta
TopographminRow minCol, :) ; Purple
end
Running Code:
Altitude readmatrixCalts.csv;
Water readmatrixCwater.csv;
Topograph lowHighDist generateTopographicalMapAltitude Water;
imageTopograph;
Error
Unable to perform assignment because the size of the left side is byby and the size of the
right side is by
Error in ProjectgenerateTopographicalMap line
TopographminRow minCol, :) ; Purple
Error in Projectline
Topograph lowHighDist generateTopographicalMapAltitude Water;
Can anyone help me with this code?
csv files are x doubles.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
