Feeds
提问
Classdef Static method calling builtin subsref instead of classdef subsref
I've got a custom class class called myclass that is a thin wrapper around a double array. So, when constructing arrays of thes...
2 days 前 | 1 个回答 | 0
1
个回答Rapid calculation of the number of points in a circular neighbourhood
Here is a C-mex routine to do the job. The run itself using the free MinGW64 C Compiler without any special optimizations or mu...
16 days 前 | 0
Using C library, function with fucntion pointer as a parameter.
I'm assuming your real function is not actually sqrt(), else you would just call a C math library function for this. But my exa...
22 days 前 | 0
| 已接受
Does Matlab Take Full Advantage of the BLAS Routines?
"Does Matlab Take Full Advantage of the BLAS Routines?" No. At least it didn't used to and I am assuming that is still the cas...
2 months 前 | 2
| 已接受
How to use half.typecast
k = uint16(65444) dec2bin(k) half.typecast(k) The half precision data type has 1 sign bit, 5 exponent bits, and 10 explicit s...
3 months 前 | 4
| 已接受
Does [V,D] = eig(A) always return normalized eigenvectors for any real matrix A?
A discussion of eigenvector normalization can be found in the doc. In some cases, the answer is yes they are "normalized to unit...
5 months 前 | 1
Flag to switch quaternion definition from Hamiltonian to JPL Convention for the scalar?
I think all of the MATLAB functions are s,i,j,k. I am unaware of any functions that allow for i,j,k,s. You will probably have ...
7 months 前 | 2
| 已接受
Performance of MEX versus builtin functions
I don't know the answer to your first question. But I would expect the overhead for the mex function entry (other than loading i...
7 months 前 | 1
| 已接受
mxArray values of plhs[] on entry to mexFunction()
I am unaware of any way to detect this in a mex function. It would be nice, of course, so that mex code could avoid some unnece...
8 months 前 | 1
| 已接受
Find roll, pitch, and yaw from the same vector in two different coordinate systems
If you just want a "minimum angle rotation" solution, you can form a rotation quaternion from the vectors and then convert the q...
9 months 前 | 0
Array Indices error while plotting an exponential function.
Maybe this is what you want. Use f instead of f(t), and use .* (element-wise multiply) instead of * (matrix multiply). The syn...
11 months 前 | 0
| 已接受
mxCreateDoubleMatrix - what value is used to initialize the array ? Documentation incomplete
I agree that the official documentation could maybe be written better regarding how elements are initialized. I.e., simply addin...
12 months 前 | 0
| 已接受
Matlab crashed when running Pardiso mex file with certain input size
I haven't had time to look at this thoroughly, and I am unfamiliar with PARDISO, but the symptoms you describe are usually the c...
1 year 前 | 0
Setting the Output of a MEX Function as One of the Inputs After In Place Manipulation
A couple of problems. 1) First, your crash is caused by this: mxSetDoubles(plhs[0], mxGetDoubles(prhs[1])); You cannot atta...
1 year 前 | 1
| 已接受
提问
Why is vpa not converting double accurately?
I ran across this example that I don't understand. I don't use the Symbolic Toolbox much, but I thought vpa by default converte...
1 year 前 | 1 个回答 | 3
1
个回答Matlab crashes when Intel MKL's function Pardiso is called
Just seeing this post. Too late for OP, but for future readers here are my comments: ---------------------------------------- ...
1 year 前 | 0
Plots saved as JPEG look awful. How to improve?
You might also explore export_fig from Yair Altman, found here: https://www.mathworks.com/matlabcentral/fileexchange/23629-expo...
1 year 前 | 0
need to vectorize efficiently calculating only certain values in the matrix multiplication A * B, using a logical array L the size of A * B
You can try this naive mex routine. Not optimized at all for cache hits or patterns in L. Might be faster to transpose A first, ...
1 year 前 | 1
| 已接受
ode45 code for 2 body problem
Your system has an initial non-zero total linear momentum. Recall that the 2-Body Problem has a constant center of mass motion ...
1 year 前 | 0
| 已接受
Get total number of leap seconds relative to gps time
To convert a GPS timestamp to a UTC time, use the UTCLeapSeconds time zone which automatically accounts for leap seconds in the ...
1 year 前 | 0
How to use datetime with leap second strings?
@Peter Perkins Thanks for the reply. My comments ... "... I'd be curious to hear where you are getting timestamps that honor l...
1 year 前 | 0
How to preserve nanosecond precision in datetime calculations (for large numbers)
This question already has an accepted answer, but I would like to add my observations on this topic. datetime: Internally hold...
1 year 前 | 0
提问
How to use datetime with leap second strings?
Suppose we have the following date time string: ds1 = "30-Jun-1972 23:59:59.5"; You can convert that to a datetime easily: da...
1 year 前 | 3 个回答 | 0
3
个回答Why Is Colon Operator Not Equivalent To linspace Command?
The short answer is that the algorithms are different. In the first place, 0.08 cannot be represented exactly in IEEE double pre...
1 year 前 | 3
C++ Mex function being passed a MATLAB class object
mxDuplicateArray( ) does indeed create deep copies ... or at least it used to. Not sure why that would have changed. There migh...
1 year 前 | 1
| 已接受
Error using mex, building with 'MinGW64 Compiler (FORTRAN)'
FYI, you should never use literal constants in a Fortran API call, because you can't be sure whether the literal integer(4) or i...
2 years 前 | 1
How to pass a Matlab function handle to C-Mex Code
To use a function handle in a mex function with C array as an input to the function handle, you can use mexCallMATLAB( ) with th...
2 years 前 | 2
| 已接受
Kalman Filter Velocity data looking too similar to position data
Your velocity vf and position rf calculations as shown represent "change" over dt, not current value. Think about it. If you had...
2 years 前 | 0
| 已接受
Is giving a space after comma in functions the convention?
A MATLAB specific thing that is somewhat related is that spacing is important in concatenation. E.g., the following look similar...
2 years 前 | 1
My Numerical Solution doesn't align with the exact solution
Assuming your state is [vc,vc'] in that order, then it appears your initial conditions are backwards and should be this instead:...
2 years 前 | 1











