Question about in code variables

조회 수: 9 (최근 30일)
Daniel Vonderhaar
Daniel Vonderhaar 2022년 2월 2일
댓글: Daniel Vonderhaar 2022년 2월 2일
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')

채택된 답변

the cyclist
the cyclist 2022년 2월 2일
It can be any valid variable name.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Entering Commands에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by