Respondida
How can I maintain to complex type when copying arrays?
MATLAB variables store the real and imaginary parts in different areas of memory. For a real variable, the imaginary part is not...

alrededor de 14 años hace | 0

| aceptada

Respondida
Error with mex function
Reading a MATLAB character string with Fortran syntax logical constants into a Fortran logical variable: character*20 TF ...

alrededor de 14 años hace | 0

| aceptada

Respondida
C++ std::tr1::array
The LCC compiler that ships with MATLAB is a C compiler, not a C++ compiler.

alrededor de 14 años hace | 0

Respondida
in this loop value of n is 0.05 and value of t is 0.700. If I run this loop, then for 'o = 1'. the matrix generatd fr U does not contain the lat element i.e. 0.700 and the V matrix does not contain first element - 0.700. Please help
In expressions like this: U = 0:n:t : V = t:-n:0; you should *not* use a value of n that is fractional (e.g., 0...

alrededor de 14 años hace | 0

Respondida
how to inverse a vector
For reversing the elements even if they are not sorted: v(end:-1:1) or flipud(v) % or use fliplr for a row vector ...

alrededor de 14 años hace | 1

| aceptada

Respondida
logarithm of base other than e,10 and 2
logB(X) = logA(X) / logA(B) You can pick A to be one of the built in functions, like log or log2 or log10. E.g., l...

alrededor de 14 años hace | 10

| aceptada

Respondida
Helping -largeArrayDims flag find c files
You need to set the current directory to the directory where diagmult.c is located. Then try the mex command again.

alrededor de 14 años hace | 0

| aceptada

Respondida
Mex function, one or more output arguments not assigned
102 outputs is a *LOT*, and seems to me would be hard to maintain. Returning a single cell array would probably be a better appr...

alrededor de 14 años hace | 2

Respondida
Reading memory that belongs to another process on Windows
No. In general, the memory of one process cannot be accessed by another process. There are ways to pass data such as the address...

alrededor de 14 años hace | 0

Respondida
how do you use the built taylor function, can some one give an example
From the documentation: syms x taylor(exp(x)) taylor(sin(x)) taylor(cos(x)) ans = x^5/120 + x^4/24 + x^3...

alrededor de 14 años hace | 1

| aceptada

Respondida
Creating matrix of maximum values from multiple dimension matrix
Your words don't seem to match your example, at least to me, since you seem to be taking the max of the rows, not the columns. B...

alrededor de 14 años hace | 0

Respondida
what is the optimal way to build a sparse matrix from row/col index, and value data?
Is the result of the query sorted? I.e., is it already in column major order the way MATLAB will naturally store it? (1,1) follo...

alrededor de 14 años hace | 0

Respondida
saving in loop-- using eval or num2str?
save(filename, ['events_' num2str(yr)]);

alrededor de 14 años hace | 2

Respondida
How can I convert a string to a double precision decimal number without losing the leading zeros ?
Is the comma in the string meant to be a decimal point? E.g. s = '-0,01298784' s(s==',') = '.' str2double(s)

alrededor de 14 años hace | 1

| aceptada

Respondida
Deep copy of handle object?
You could try a mex function, but I have not investigated how the API routine mxDuplicateArray behaves with handle-derived class...

alrededor de 14 años hace | 0

Respondida
Euler Angle Calculation from rotated reference frame
You can use this FEX submission by John Fuller to convert from a direction cosine matrix to any Euler Angle sequence you like: ...

alrededor de 14 años hace | 2

Respondida
When to use MEX in a MATLAB progam (Example of an Ulam Map)
For starters, get rid of the function call overhead: B[n] = 1.0-2.0*(B[n-1]*B[n-1]); You can also play games with *B vs...

alrededor de 14 años hace | 0

Respondida
MEX - Multidimensional Array passing to Fortran
A couple of options: -------------------------------------- 1) See this FEX submission: <http://www.mathworks.com/m...

alrededor de 14 años hace | 0

| aceptada

Respondida
Performing Gauss Elimination with MatLab
You could start with this FEX submission: <http://www.mathworks.com/matlabcentral/fileexchange/13451-gauss-elimination-with-c...

alrededor de 14 años hace | 0

Respondida
Define a Sparse Matrix without sparse function.
The sparse command can use multiple input formats: < http://www.mathworks.com/help/techdoc/ref/sparse.html> E.g., "S =...

alrededor de 14 años hace | 2

| aceptada

Respondida
Help with Mex function
mwPointer mxGetField mwPointer mxGetPr mwPointer mxcreatedoublematrix mwIndex index mwpointer var_ptr, fd_ptr, sfd...

alrededor de 14 años hace | 0

| aceptada

Respondida
Finding CRS format of matrix in Mex
Can't you just transpose it within MATLAB, and then treat the resulting row indexes as column indexes and column "pointers" as r...

alrededor de 14 años hace | 0

Respondida
Change a 4-D matrix
A = permute(A,[1 2 4 3]);

alrededor de 14 años hace | 1

| aceptada

Respondida
Creating a cell array of size n
The most memory efficient way is the following without a loop: C(1:n) = {'red'}; % Assuming C doesn't exist yet (EDITED) ...

alrededor de 14 años hace | 2

| aceptada

Respondida
treating NaN as a unique value (instead of as a distinct)
Assuming the input A is double class and all the NaN values have the same underlying bit pattern (which seems to be true of the ...

alrededor de 14 años hace | 2

Respondida
MEX Code in Matlab Wrapper
Yes, it does take extra time to repeatedly do the allocation/deallocation. In your current code, is this a C++ object? A MATLAB ...

alrededor de 14 años hace | 0

Respondida
Copying dynamic array to MxArray object using memcpy in c++
Problem #1) Your method is a poor way to allocate a 2D matrix because it does *not* require that all of the individual column...

alrededor de 14 años hace | 1

| aceptada

Respondida
Problem extracting data out of a variable of mat file in C++
Your incorrect code: /*Get Variable*/ pa = matGetVariable(pmat, file); The 2nd argument is supposed to be the var...

alrededor de 14 años hace | 0

Resuelto


inner product of two vectors
inner product of two vectors

alrededor de 14 años hace

Respondida
As a Software Engineer, Why should I use MATLAB?
It's fun.

alrededor de 14 años hace | 4

Cargar más