Editing User:Markuman

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 107: Line 107:
       0.602763376071644
       0.602763376071644


Default Matlab seed is rand('twister',twister_seed(5489))




==== TODO ====
==== TODO ====


* https://savannah.gnu.org/bugs/?42557
* Find the `seed` stuff in octave source
 
=== compiling .mex files written by octave for matlab ===
 
Example file
 
    #include "mex.h"
   
    void
    mexFunction (int nlhs, mxArray *plhs[],
                int nrhs, const mxArray *prhs[])
    {
      mexPrintf ("Hello, World!\n");
   
      mexPrintf ("I have %d inputs and %d outputs\n", nrhs, nlhs);
    }
 
Note: Octave need the file extension .mex.  Matlab needs on Linux .mexa64 and on Windows .mexw64 etc.
 
==== using gcc or tcc on the same plattform ====
 
 
Using tcc or gcc
 
    tcc -I/usr/include/octave-3.8.1/octave/ -lm -shared mexample.c -o mexample.mex
    gcc -I/usr/include/octave-3.8.1/octave/ -lm -shared -fPIC mexample.c -o mexample.mex
 
    cp mexample.mex mexample.mexa64
 
This function can now be used on Linux x64 plattform from both, octave and matlab.
 
* TODO: crosscompiling
Please note that all contributions to Octave may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Octave:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)