Ejemplo n.º 1
0
    public (bool, string) ProcessDf(SimpleDf df)
    {
        var ok        = true;
        var errmsg    = "";
        var rheights  = new List <float>();
        var vsum      = 0f;
        var icnt      = 0;
        var nc        = df.Ncol();
        var nr        = df.Nrow();
        var icolstart = df.ColIdx("V0");

        for (int irow = 0; irow < nr; irow++)
        {
            for (int icol = icolstart; icol < nc; icol++)
            {
                var v = df.GetFltColRow(icol, irow);
                rheights.Add(v);
                vsum += v;
                icnt++;
            }
        }
        ok = true;
        var vavg = vsum / icnt;

        Debug.Log($"Got {icnt} values average:{vavg}");
        heights = rheights;
        return(ok, errmsg);
    }