MATLAB Academy Task 4 longitude limits are incorrect

I am completing the MATLAB Academy course "How MATLAB Graphics Work" in the activity "Modify Plot Data and Axes for Animation."
In Task 2, I am asked to extract the latitude and longitude limits from the original Hurricane Ike geoscatter plot using:
latLim = ax.LatitudeLimits;
lonLim = ax.LongitudeLimits;
The latitude limit is accepted as correct, but the longitude limit is marked incorrect. Task 4 then uses:
geolimits(latLim,lonLim)
The plot displays longitude values around 270°E to 340°E, and I am unsure why the value returned by ax.LongitudeLimits is not accepted by the activity.
Could you please clarify the exact expected longitude limits for Task 2 and the correct MATLAB code to complete Task 4?

 Accepted Answer

Torsten
Torsten on 7 Oct 2026 at 21:27
Moved: Torsten on 7 Oct 2026 at 21:33
Answer from AI:
For Task 4 in the MATLAB Academy course, you need to extract the axis limits from the current GeographicAxes object and store them in the specified variables.
Here is the exact MATLAB code required for this task:
matlab
% Task 4: Extract the latitude and longitude limits
latLim = ax.LatitudeLimits;
lonLim = ax.LongitudeLimits;
💡 Troubleshooting Tip
If MATLAB Academy returns an error or marks your answer as incorrect, it is usually due to actions in a previous step:
  • If you manually zoomed or panned the Hurricane Ike plot in the figure window during an earlier task, the values inside ax.LatitudeLimits and ax.LongitudeLimits will have changed.
  • The Fix: Click "Reset" for the activity to restore the plot to its original state. Then, re-run your code for the earlier tasks without touching or dragging the plot window before executing Task 4.
If this doesn't help, contact support:

More Answers (0)

Categories

Products

Release

R2026a

Asked:

on 7 Oct 2026 at 18:02

Commented:

on 8 Oct 2026 at 7:10

Community Treasure Hunt

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

Start Hunting!