📜  函数的两个八度输出 - 无论代码示例

📅  最后修改于: 2022-03-11 14:57:39.357000             🧑  作者: Mango

代码示例2
function [max, idx] = vmax (v)
  idx = 1;
  max = v (idx);
  for i = 2:length (v)
    if (v (i) > max)
      max = v (i);
      idx = i;
    endif
  endfor
endfunction