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.
  1 件のコメント
Daniel Vonderhaar
Daniel Vonderhaar 2022 年 2 月 2 日
thank you!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeEntering Commands についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by