I am trying to find the minimum pressure by a specific storm id and assign that a value of one. I tried using a nested for loop with an if statement, but this is not working. Below is my code, and if you could help out, that would be great!
lifecycle = zeros(285,1); %// variable lifecycle denotes max storm intensity
for c = 1:285 %// counter
for id = 188:100:1288 %// loop through each storm code(188,288,...1288)
if min_press(c) == min(min_press(id)) %// find min pressure of each id
lifecycle(c) = 1; %// assign min a value of 1
end
end
end