Respondida
Mex/Fortran passing data
Download this package from the FEX: <http://www.mathworks.com/matlabcentral/fileexchange/25934-fortran-95-interface-to-matlab...

alrededor de 14 años hace | 2

| aceptada

Respondida
Writing MAT file from c++. I have fully compiled code but values come out odd.
Walter has noted your problem already, but I would point out that this is not the best way to go about things. You can avoid the...

alrededor de 14 años hace | 0

| aceptada

Respondida
Mex Files and Variables in the Matlab Workspace
This is called "shared data copy", or "copy-on-write", or "lazy copy" in various contexts. I will be producing a guide to all of...

alrededor de 14 años hace | 3

Respondida
Why is (2.24*10)-22.4 not equal to 0?
>> num2strexact(0.3) ans = 0.299999999999999988897769753748434595763683319091796875 >> num2strexact(0.2) ans =...

alrededor de 14 años hace | 3

| aceptada

Respondida
fortran matlab
Stack space typically comes from local variables and intermediate calculations. Try to avoid these for large variables. Use allo...

alrededor de 14 años hace | 1

| aceptada

Respondida
Matlab mex memory handling - same input different result
Cross-posted in the newsgroup, so I will repeat my reply here: What does the BladeElementGC interface look like? Normally I w...

alrededor de 14 años hace | 0

Respondida
Fortran interface advice
See this package and use the fpGetPr0, fpGetPr1, and fpGetPr2 functions to copy data into and out of the mxArray: <http://www...

alrededor de 14 años hace | 0

Respondida
memory space for cell array
A MATLAB variable consists of: Structure (about 60 bytes on a 32-bit system, a bit more on 64-bit systems) containing informa...

alrededor de 14 años hace | 11

| aceptada

Respondida
mexCallMATLAB ... Help me please.
mxArray *A; double *d; A = mxCreateNumericMatrix(1, 1, mxDOUBLE_CLASS, mxREAL); d = mxGetPr(A); ...

alrededor de 14 años hace | 1

Respondida
Mex implemeentation
Copy the file yprime.c from the MATLAB directory it is located in to your current working directory. It can be found in: [m...

más de 14 años hace | 0

| aceptada

Respondida
how deal with time stamp with unix seconds?
Everything you need is in the link you provided. E.g., >> datestr(881250949/86400 + datenum('1/1/1970')) ans = 04-Dec...

más de 14 años hace | 0

| aceptada

Respondida
Converting vector to binary and summing it
What is the range of your numbers? You might be able to simply convert them to double, then add them, then mod the result with ...

más de 14 años hace | 0

Respondida
Error with simple mex file
For a file ending with extension .F the compiler assumes fixed form format for the source code. This means: Columns 1-5 are t...

más de 14 años hace | 0

| aceptada

Respondida
Maximize size of a 3D matrix
Maybe use a different class: q = randi([0 10],38000,50,100,'int8');

más de 14 años hace | 0

| aceptada

Respondida
Printing Sparse Matrix in mex function in CCS format
To print out the raw array contents: void spprintraw(const mxArray *mx) { mwSize n; mwIndex *ir, *jc; ...

más de 14 años hace | 0

Respondida
Printing Sparse Matrix in mex function in CCS format
I'm not sure what your real question is. Do you just want to print a sparse matrix from within a mex function? If so, you can us...

más de 14 años hace | 0

| aceptada

Respondida
Matrix multiplication (best computational approach)
If you are simply after speed, the fastest approach will be a mex routine to do the calculations inline (i.e., explicitly withou...

más de 14 años hace | 1

Respondida
Mex file with OpenMP - Unexpected behavior
One thing for sure is you need to make th_id private (but that is just a printing issue that would not affect the total number o...

más de 14 años hace | 0

Respondida
how to delete NaN from a column of data
For your particular example: mean(data(~isnan(data))) For general nan handling, you might take a look at the FEX submiss...

más de 14 años hace | 1

Respondida
Finding eigenvectors of a matrix when all eigenvalues are known
Sounds like you are simply looking for the null space of M: Vset = null(M);

más de 14 años hace | 0

| aceptada

Respondida
Mex dll and c file in Win7 64bit (Matlab 2010b)
I don't have a 64-bit system to test with, but the following does produce results on a 32-bit system. I have no idea if they are...

más de 14 años hace | 1

Respondida
Mex dll and c file in Win7 64bit (Matlab 2010b)
As Walter has already pointed out, versions of MATLAB through R2006b had the BLAS and LAPACK routines in one library, the libmwl...

más de 14 años hace | 2

| aceptada

Respondida
How can I save an array in matlab to binary format as big endian data?
See the fwrite function: <http://www.mathworks.com/help/techdoc/ref/fwrite.html> And pay attention to the machineformat ar...

más de 14 años hace | 1

| aceptada

Respondida
Count the number of non-zero elements of a column/row of a 2D-Matrix?
sum(X(row_number,:)~=0)

más de 14 años hace | 6

| aceptada

Respondida
error using ==> times
You can do this: m = int32(1:3); n = m .* 2; % integer class times scalar double You can't do this: m = int32(...

más de 14 años hace | 1

| aceptada

Respondida
Matlab engine in Fortran code (gfortran problem)
In Fortran you should never pass literal constant arguments to the API functions since they can vary in size among different pla...

más de 14 años hace | 0

Respondida
array
The nomenclature typically is: Scalars are 1x1 Vectors are 1xN or Nx1 Matrices are MxN Arrays are typically 3D or mo...

más de 14 años hace | 0

| aceptada

Respondida
MEX - multiple export functions
To have your variables retain values from call to call, put them at the highest level of your code (i.e., outside any function s...

más de 14 años hace | 1

| aceptada

Respondida
Matrix Max Sum
It was an interesting question, so I did a mex implementation. Uses a brute force indexing scheme with rejection (i.e., goes thr...

más de 14 años hace | 0

Respondida
Matlab version 2008b not recognizing Microsoft Visual Studio 2010 C++ compiler
You might be able to find some mex setup files in the FEX to help you. E.g., <http://www.mathworks.com/matlabcentral/fileexch...

más de 14 años hace | 0

Cargar más