Exemplo n.º 1
0
        private void btnTest_Click(object sender, EventArgs e)
        {
            double[] a = null;

            if (!string.IsNullOrWhiteSpace(tbA.Text))
            {
                a = MatlabCompat.CreateArray(tbA.Text);
            }
            double[] b = null;
            if (!string.IsNullOrWhiteSpace(TbB.Text))
            {
                b = MatlabCompat.CreateArray(TbB.Text);
            }

            if (b.Length < a.Length && b.Length == 1)
            {
                double holder = b[0];
                b = new double[a.Length];
                for (int index = 0; index < b.Length; index++)
                {
                    b[index] = holder;
                }
            }


            if (!(a == null || b == null))
            {
                double[] m = null; double[] v = null;

                GplBetastat.betastat(a, b, out m, out v);

                tbM.Text = ArrayFunctions.JoinDoublesToDelimitedString(m);
                tbV.Text = ArrayFunctions.JoinDoublesToDelimitedString(v);
            }
        }
Exemplo n.º 2
0
 public static string GetDisplayableCommaDelimitedArrayString(double[] arrayWithData)
 {
     return(ArrayFunctions.JoinDoublesToDelimitedString(arrayWithData).Replace(",", ", "));
 }