Questions tagged [matlab]
MATLAB is a high-level language and interactive programming environment developed by MathWorks. It is the foundation for a number of other tools, including Simulink and various toolboxes that extend the core capabilities.
169 questions
5votes
1answer
135views
Accelerating computation of a "2D Variance" using C++ and Eigen in a MEX function
I have the following function in Matlab: ...
1vote
0answers
60views
Bi-Directional A* function in MATLAB
I am currently working on my thesis for 3D path planning involving external elements, and I have completed about 1/5 of the total trials that I am doing. For each 1/5 of the trials I am increasing the ...
5votes
2answers
227views
Srivastava multivariate Fox H function in MATLAB
I was trying to rewrite the Python code in MATLAB. The result is consistent. But, the MATLAB code is so slow. Any help would be appreciated. Ref python code link The MATLAB code written by me is as ...
8votes
3answers
2kviews
Why/How is Matlab's circshift function so efficient?
I have the following function in Matlab: ...
2votes
1answer
131views
Optimizing Matlab Code for Efficient Computation of a Formula with Detrending
i am trying to practice on matlab with the code below: I randomly generated x and y variable to implement the following formula in matlab : $${\sum_{i=1}^{n-ln} \bar{Y}_{i}\left(\bar{X}_{i} - \frac{...
2votes
1answer
123views
considering only the instants of trading with the relative price avoiding stale returns
in my MATLAB code I describe a model for price formation with stale returns in this framework there are 2 type of trader: informed traders who always trade in the "right direction" and noise ...
6votes
1answer
264views
C++ Eigen/Mex function to perform two pagewise convolutions on a 3D matrix with a simple kernel
I am trying to accelerate an algorithm where I am computing a 2D variance of many complex matrices stored as pages of a 3D array in Matlab. My implementation uses a Mex function with the C++ Matlab ...
3votes
1answer
68views
Simple validation and mathematical function in MATLAB
I've made a script (Triangle.m) to calculate the area of a triangle in MATLAB: ...
0votes
1answer
91views
Performance Optimization in Matlab
I am working with a rather large data set (upwards of 1 million entries across 3 variables), and need to isolate a subset of that data with specific values in one of the 3 data fields. The data are ...
4votes
0answers
63views
Use XYZ data to create cross sectional profiles across beach terrain, using OS Grid
This might be a slightly long question, but I've recently been doing a bit of R&D on the data processing workflows within the company that I work at and it would be great to see if there are any ...
3votes
1answer
132views
String / Char Vector Concatenation Performance Comparison in Matlab
Considering the suggestion of using modern string arrays instead of char vectors proposed by Cris Luengo, I am trying to make a code snippet for performance comparison of these two cases. The ...
2votes
2answers
232views
No Reference Image Quality Assessment for Video in Matlab
I am trying to perform the No-Reference Image Quality Assessment (NR-IQA) calculation on video. Several NR-IQA methods including Naturalness Image Quality Evaluator (NIQE), Perception based Image ...
2votes
1answer
235views
Fractional indexing and interpolation to reconstruct an image
I have a c++ project written as a Matlab Mex program that is constructing an image composed of IxJ pixels. Each pixel value is calculated by finding the contributions to that pixel from all the ...
2votes
1answer
237views
Cholesky decomposition
This code is Cholesky decomposition in numerical linear algebra. ...
2votes
1answer
77views
Recursion to generate fractal
I used recursion to generate fractal and got the desired result but I think my code can be better I started using MATLAB a few days ago and since than trying and learning new things. Now this code ...