triforcely / Octave.NET

📈 More than cross-platform Octave process wrapper 🔬
MIT License
32 stars 7 forks source link

I've successfully tested below code in OSX. #8

Closed bemoregt closed 5 years ago

bemoregt commented 5 years ago

Hi, @CptWesley @triforcely

I've successfully tested below code in OSX. Compiled in VS for mac.

using System; using System.IO; using Octave.NET;

namespace ConsoleOctave1 { class Program { static void Main(string[] args) { using (var octave = new OctaveContext()) { octave.Execute("pkg load image;"); double[][] result = octave .Execute("aa=peaks(256)") .AsMatrix();// 10

            Console.WriteLine(result[1][1].ToString());

            StreamWriter sw1;
            sw1 = new StreamWriter("data.txt");
            for (int i = 0; i < 256; i++)
            {
                for (int j = 0; j < 256; j++)
                {
                    sw1.WriteLine(result[i][j].ToString());
                }
            }
            sw1.Dispose();

        }//using Octave
    }// method
}// class

}// namespace

And Now, I want saving image from octave. How can I save my octave image using Octave.net?

triforcely commented 5 years ago

Use octave functions for that. This project is an Octave wrapper and I'm not going to provide support related to the actual Octave functionality.