Respondida
matrix transpose multiplication precision
MATLAB uses BLAS routines to do matrix multiplication. There are separate routines available for generic matrix multiplication a...

casi 13 años hace | 0

| aceptada

Respondida
Using mex for c++ file
LCC is a C compiler, not a C++ compiler. You need to select option 3 above (MIcrosoft Visual C/C++) to compile cpp files.

casi 13 años hace | 0

Respondida
About the calculation precise
For your particular example, none of the values can be represented in IEEE double exactly: >> num2strexact(60.425) ans...

alrededor de 13 años hace | 0

Respondida
while loop keeps running indefinitely
You never set test to anything other than 0, so the loop condition is always true.

alrededor de 13 años hace | 0

| aceptada

Respondida
Zero inputs in C-Mex-function
// 0 inputs, any reasonable number of outputs (scalars 1, 2, ... etc) #include "mex.h" void mexFunction(int nlhs, mxArra...

alrededor de 13 años hace | 0

| aceptada

Respondida
How can I create variables with for loop?
<http://www.mathworks.com/matlabcentral/answers/143-how-do-i-make-a-series-of-variables-a1-a2-a3-a10>

alrededor de 13 años hace | 2

Respondida
Is comparing type mwSize to an int valid?
If int_T is a 32-bit integer and mwSize is a 64-bit integer (typically size_t, unsigned) then yes it is physically possible to h...

alrededor de 13 años hace | 0

| aceptada

Respondida
Using mex files with Fortran 90
Not sure what the options files look like on a Mac, but if you see a /fixed option on the COMPFLAGS line, get rid of it. That is...

alrededor de 13 años hace | 0

Respondida
can multiple versions of matlab be run from concurrent license?
Yes.

alrededor de 13 años hace | 1

Respondida
vectorizing calculation of eigen values of a large multi-dimensional array
How large is large? You could form the tensor as a 3x3xN matrix and then use this FEX submission by Bruno Luong: <http://www....

alrededor de 13 años hace | 0

| aceptada

Respondida
index in mxSetProperty or mxGetProperty
It crashes because there is only one element in the testcalls array being passed into the mex routine. I.e., I expect you are do...

alrededor de 13 años hace | 1

Respondida
Segmentation violation error when I run a mex file
You should use "implicit none" in your code ... it is one of the few friends you have in Fortran. You should declare all of y...

alrededor de 13 años hace | 1

| aceptada

Respondida
How to index all columns but one in a matrix?
B = A; B(:,3) = [];

alrededor de 13 años hace | 6

| aceptada

Respondida
How does it work pcode?
You might start with these threads: <http://www.mathworks.com/matlabcentral/answers/75012-pcode-obfuscation-cracked-alternati...

alrededor de 13 años hace | 3

Respondida
Evaluate a cubic equation
Type this into Google (copy & paste from your description): "MATLAB function that evaluate a cubic equation" Click on the ...

alrededor de 13 años hace | 0

Respondida
1.1 - int32(1) = 0 ?
E.g., see here: <http://www.mathworks.com/help/matlab/matlab_prog/integers.html> "Arithmetic operations that involve both ...

alrededor de 13 años hace | 1

| aceptada

Respondida
Resultant matrix is rotated 90 whether I use MEX or MatLab function
It is the code that you don't show that is likely at the heart of the problem ... the indexing you use and how it relates to the...

alrededor de 13 años hace | 2

Respondida
First non-zeros of a sparse array
You can use a mex routine for this, but you will need a C compiler to compile it. E.g., create a file called firstNonZeroMex.c w...

alrededor de 13 años hace | 1

Respondida
Accessing elements in an mxArray
mxGetCell(num, 40) returns an (mxArray *), i.e. a pointer to an mxArray. Thus, by extension, *mxGetCell(num, 40) deferences that...

alrededor de 13 años hace | 1

| aceptada

Respondida
Fastest way to fill in an array
The results will be highly dependent on MATLAB version used. Since none of the examples explicitly pre-allocate the result, you ...

alrededor de 13 años hace | 5

Respondida
Creating a structure within a structure in C++
Some comments about the m-file code: a.b.field1="data"; Creates a structure 'a' with one field, 'b'. Also 'b' gets crea...

alrededor de 13 años hace | 1

Respondida
Using xlsread with the MATLAB Engine
Please explain "returning 0". Is the engEvalString call itself returning 0? If so, that is good because that is the normal state...

alrededor de 13 años hace | 0

| aceptada

Respondida
minimum row value and return the row
If you want row that contains the minimum value (it is not clear to me what "minimum row" means): [x xi] = min(A(:)); xi...

alrededor de 13 años hace | 0

Respondida
Updating variables in workspace from MEX functions
What you are doing wrong is mixing C/C++ native memory with MATLAB memory. If you do this MATLAB will crash, as you have found o...

alrededor de 13 años hace | 0

| aceptada

Respondida
How to force MATLAB to use single precision ONLY?
Good Luck. I have struggled for years with this difficulty when trying to emulate algorithms that run on a different computer...

alrededor de 13 años hace | 3

Respondida
mexw64 function dynamically linked to .dll will not run w/out c compiler
Typically you don't need the C compiler itself installed, you only need the libraries, which are usually free to download and in...

alrededor de 13 años hace | 0

| aceptada

Respondida
xlsread and MATLAB engine Question
You can use xlsread in a MATLAB Engine and then send it to your C++ program. Note that *all* data sent between the Engine and yo...

alrededor de 13 años hace | 1

| aceptada

Respondida
How to import a file with multiple formats (8 bit words, 16 bit words, 32 bit data)
Try something like this to start with: fid = fopen('altestbif (10).BIF6'); if( fid == -1 ) % handle error e...

alrededor de 13 años hace | 1

| aceptada

Respondida
Problem comparing two variables
Floating point operation limitations. E.g., see here <http://www.mathworks.com/matlabcentral/answers/41536-why-is-2-24-10-22-...

alrededor de 13 años hace | 0

| aceptada

Respondida
Applying LeapYear function into the Matlab Scipt
Put your isLeapYear function code (everything from the function LeapYear etc line to the corresponding end line) in a separate f...

alrededor de 13 años hace | 2

| aceptada

Cargar más