Question about in code variables

1 visualización (últimos 30 días)
Daniel Vonderhaar
Daniel Vonderhaar el 2 de Feb. de 2022
Comentada: Daniel Vonderhaar el 2 de Feb. de 2022
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')

Respuesta aceptada

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

Más respuestas (0)

Categorías

Más información sobre Tables en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by