Respondida
Compiling with Mex - Can I reference Environment Variables?
Have you tried the function version of the mex command? E.g., mex('-v','COMPFLAGS="$COMPFLAGS -I%REF_DIR%/include"','my_sfu...

alrededor de 15 años hace | 0

Respondida
How to create variable in MAT file that is too large to fit in memory?
You could create the MAT file from scratch in a Fortran or C/C++ program using the published uncompressed MAT file format. E.g.,...

alrededor de 15 años hace | 1

Respondida
Fast calculation of short cumulative product vector
Here is the quick and dirty mex solution: // File cumprodx.c // c = cumprodx(a,n) does equivalent of c = cumprod(a.*ones...

alrededor de 15 años hace | 0

Respondida
Fast calculation of short cumulative product vector
Or this variation, which I don't see in the current posts: y = cumprod(a.*ones(1,n)); I think the MATLAB JIT may recogn...

alrededor de 15 años hace | 2

Respondida
row/column indexing in MEX file
I don't think you are going to be able to write code that is significantly faster than A[i+j*n_rows]. You could allocate an arra...

alrededor de 15 años hace | 0

Respondida
find peaks
You might try one of the FEX submissions, e.g. PeakFinder by Nate Yoder: <http://www.mathworks.com/matlabcentral/fileexchange...

alrededor de 15 años hace | 1

Respondida
using matlab engine from c++: How to convert a int** into mxArray*
Repeating your comment above for how you allocate opSet: opSet = new double*[columns]; for (p=0; p<columns ; p++) o...

alrededor de 15 años hace | 2

| aceptada

Respondida
What is your time zone?
Here is a related thread to see what your Java package thinks about your timezone: <http://www.mathworks.com/matlabcentral/an...

alrededor de 15 años hace | 2

Respondida
mxMalloc vs mxCreate
You will need to provide more details on your questions. For your 2nd paragraph, note that you CANNOT mix C native memory into a...

alrededor de 15 años hace | 0

Respondida
Accessing handle graphics from within Fortran mexfunction
You can get Fortran versions of mexGet and mexSet in my Fortran 95 interface package, which can be found here: <http://www.ma...

alrededor de 15 años hace | 0

Respondida
Mex problems on 64bit machine
You need to strictly follow the API types. You don't get automatic argument type conversion in Fortran like you do in C. Change ...

alrededor de 15 años hace | 1

Respondida
Floating Point Representation
1) What does this have to do with MATLAB? 2) How can you have numbers in the e-9 and e-12 range with only one exponent digit?...

alrededor de 15 años hace | 0

Respondida
Converting Vector to matrix.
Also not sure how general you want the method to be, but here is another way for your particular example: n = ceil(numel(V)...

alrededor de 15 años hace | 0

Respondida
Access preallocated matrix on left hand side inside MEX
To do what you are asking to do, you would pass in x as an input argument and then modify it in place (i.e., it would be one of ...

alrededor de 15 años hace | 0

Respondida
Need 32 bit version of Matlab for Windows XP
If you have several versions available (e.g., maybe you are on a service schedule) I would install *all* of them.

alrededor de 15 años hace | 0

Respondida
How to solve big sets of linear equations in c++ using MATLAB functions
In a mex routine you can iteratively call MATLAB functions via mexCallMATLAB to do the solving etc. You can pass variables back ...

alrededor de 15 años hace | 0

Respondida
Advice on reading an unformatted Fortran binary file into Matlab
Fortran unformatted binary, unfortunately, is not like C binary or MATLAB binary. Fortran binary typcially puts in record marker...

alrededor de 15 años hace | 0

| aceptada

Respondida
Using Clohessy-Wi;tshire equations to demonstrate the projected circular orbit trajectory base on the initial conditions defined by parameters of Chief Satellite and Deputy Satellite Initial condition
1) Google "Clohessy Wiltshire" 2) Look at the first link 3) Look at the closed form solution on the first page of this lin...

alrededor de 15 años hace | 0

| aceptada

Respondida
Sparse C MEX File
This is causing the seg fault: mxSetIr(weights_pointer,mxGetIr(array_q)); mxSetJc(weights_pointer,mxGetJc(...

alrededor de 15 años hace | 0

Respondida
Byte ordering in calls from C/C++ to a Matlab-compiled DLL
I don't think you understood what Walter was getting at. These lines will *not* work if myBuffer is supposed to contain float da...

alrededor de 15 años hace | 2

| aceptada

Respondida
when inserting mexPrintf commands I get different outputs
I haven't examined your code, but I would look for missing prototypes for the functions you use. E.g., it could be that a functi...

alrededor de 15 años hace | 0

Respondida
How can this be true? (<) operator not working
0.1 cannot be represented exactly in IEEE double precision floating point format. Welcome to the world of floating point arithme...

alrededor de 15 años hace | 2

| aceptada

Respondida
time increment and julian date
Caution: To be precise, a sun position algorithm will need a Julian Date based on Ephemeris Time. So you would need to convert t...

alrededor de 15 años hace | 0

Respondida
Transpose matrix and then predetermine rows
A = your original column vector; B = reshape(A,24,365).'

alrededor de 15 años hace | 0

Respondida
Data from MEX-File to MATLAB
Regarding your crash question, consider this line: plhs[0] = mxCreateNumericArray((input/2)+1,mxGetDimensions(prhs[0]...

alrededor de 15 años hace | 0

| aceptada

Respondida
How to create a MEX file from a C++ function
Please post the interface to the C++ function you wish to include in the mex function. i.e., specify what the inputs and outputs...

alrededor de 15 años hace | 0

Respondida
Data from MEX-File to MATLAB
The prhs[ ] is an array of input variables, and plhs[ ] is an array of output variables. MATLAB will allocate a fixed number of...

alrededor de 15 años hace | 0

Respondida
MEX problem with mxGetData
When you use the curly braces { } in MATLAB you are building a cell array, so you need to use mxGetCell in your mex routine. E.g...

alrededor de 15 años hace | 2

| aceptada

Respondida
32-bit MEX file (Fortran) works correctly, the same 64-bit MEX file causes "Segmentation Fault"
A Fortran default integer is almost certainly an integer*4, even for 64-bit compilers. Compiler vendors typically do this so tha...

alrededor de 15 años hace | 0

Respondida
Bug in single/double operations?
This exact issue has already been discussed on the newsgroup, with the JIT being the likely cause of the difference: <http://ww...

alrededor de 15 años hace | 0

| aceptada

Cargar más