Question about in code variables

9 views (last 30 days)
Hello!
I had a quick question. I was writing this code. and I was wondering if the [m, imax] had to use m or could I use other variables?
Please let me know. Thank you
%(c)
[m, imax] = max(ace);
fprintf('Maximum ace value occured in %d and it was %d.\n', ...
years(imax), m)
[m, imax] = max(tropical_storms);
fprintf('Maximum number of tropical storms was in %d and it was %d.\n', ...
years(imax), m)
[m, imax] = max(hurricanes);
fprintf('Maximum number of hurricanes was in %d and it was %d.\n', ...
years(imax), m)
[m, imax] = max(major_hurricanes);
fprintf('Maximum number of major hurricanes was in %d and it was %d.\n', ...
years(imax), m)
fprintf('\n')

Accepted Answer

the cyclist
the cyclist on 2 Feb 2022
It can be any valid variable name.

More Answers (0)

Categories

Find more on Entering Commands in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!