ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] array«ç»ò­pºâ¥­§¡¡B¼Ð·Ç®t?

[µo°Ý] array«ç»ò­pºâ¥­§¡¡B¼Ð·Ç®t?

§Ú¦³­Ó array, §Ú·Q­n¥Î°j°é¥hºâArray(0),Array(1)...,Array(n)ªº STDEV¤ÎAVERAGE
WorksheetFunction.StDev(¤Þ¼Æ1, ¤Þ¼Æ2)
§Ú¤£ª¾«ç»ò§â array ªº­ÈÁýµ¹¥L¡A©Ò¥H§Ú§â array¥ý¦L¨ì¬Y¤@­Ó Sheet ¤W¡A¦A¥Î
WorksheetFunction.StDev(Range("Sheet").Cells(),("Sheet").Cells())
¥h§ì­È
³o¼Ë­n¥ý¦L¥X¨Ó¦A§ì­È¦³ÂIºC
½Ð°Ý«ç»ò¼g¤~¯àª½±µÁý¤Þ¼Æµ¹ StDev ¶Ü?
--------------------------------
µ{¦¡¦p¤U
For i = 0 To tRow - 1
MaxL(i) = Application.Max(Cells(StartRow + i, 3), Cells(StartRow + i, 4))   ' Loundness
MaxT(i) = Application.Max(Cells(StartRow + i, 6), Cells(StartRow + i, 7))   ' Tonality
Next i

¦^´_ 1# acdx
  1. Ar(1) = Array(50, 60, 70, 80)
  2.     Ar(2) = Array(150, 260, 370, 480)
  3.     Maxl = Application.StDev(Ar(1), Ar(2))
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 2# GBKEE
G¤j
§Úªº¯x°}¤j¤p¬OÅܼÆMaxL(i)=MaxL(0),MaxL(1),MaxL(2),...,MaxL(tRow - 1)
                                    MaxT(i)=MaxT(0),MaxT(1),MaxT(2),...,MaxT(tRow-1)
tRow¨C¦¸ªº­È¥i¯à³£·|¤£¤@¼Ë
¸Ó¦p¦ó¨DMaxL(0),MaxL(1),MaxL(2),...,MaxL(tRow - 1)ªºªí·Ç®t/¥­§¡­È
¤ÎMaxT(0),MaxT(1),MaxT(2),...,MaxT(tRow-1)ªºªí·Ç®t/¥­§¡­È

TOP

¦^´_ 3# acdx
  1. Option Explicit
  2. Sub Ex()
  3.     Dim Ar(1 To 2), Maxl, Maxt, tRow
  4.     Ar(1) = Array(6, 7, 5, 8, 9, 1, 2, 0, 22, 28)
  5.     Ar(2) = Array(16, 17, 25, 18, 29, 31, 22, 20)
  6.     For tRow = 1 To UBound(Ar(1))
  7.         Maxl = Ar(1)
  8.         Maxt = Ar(2)
  9.         ReDim Preserve Maxl(tRow)                   '¤¸¯À¼Æ -> 0 TO tRow = tRow+1
  10.         ReDim Preserve Maxt(tRow)
  11.              'Preserve ¿ï¾Ü©Ê¤Þ¼Æ¡C·í§ïÅܭ즳°}¦C³Ì«á¤@ºûªº¤j¤p®É¡A¤´µM«O¦³­ì¨Óªº¸ê®ÆªºÃöÁä¦r¡C
  12.         Cells(tRow, "A") = Application.StDev(Maxl) / Application.Average(Maxl)
  13.         Cells(tRow, "B") = Application.StDev(Maxt) / Application.Average(Maxt)
  14.     Next   
  15. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ª¾ÃÑ­n¥Î¤ßÅé·|¡A¤~¯àÅܦ¨¦Û¤vªº´¼¼z¡C
ªð¦^¦Cªí ¤W¤@¥DÃD