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.
171 questions
2
votes
1
answer
103
views
Forward Euler's method
Are there any improvements I can make to my code for forward Euler's method on Matlab?
...
2
votes
1
answer
74
views
MATLAB Gait Analysis Script
Could someone kindly help me review and fix any errors or inefficiencies in this MATLAB script? I’m trying to make sure it’s clean, robust, and optimized.
Brief description of what the code does:
This ...
1
vote
0
answers
72
views
Mismatch Between Frequency Response and Eigenvalue-Based Natural Frequency in MATLAB for a 5-DOF System with Frequency-Dependent Stiffness
I am working with a mechanical system that has five degrees of freedom (a composite plate), and I am trying to compute its frequency response, time-domain response, and natural frequencies.
I have ...
5
votes
1
answer
164
views
Accelerating computation of a "2D Variance" using C++ and Eigen in a MEX function
I have the following function in Matlab:
...
1
vote
0
answers
89
views
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 ...
5
votes
2
answers
319
views
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 ...
8
votes
3
answers
2k
views
Why/How is Matlab's circshift function so efficient?
I have the following function in Matlab:
...
2
votes
1
answer
169
views
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{...
2
votes
1
answer
150
views
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 ...
6
votes
1
answer
325
views
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 ...
3
votes
1
answer
100
views
Simple validation and mathematical function in MATLAB
I've made a script (Triangle.m) to calculate the area of a triangle in MATLAB:
...
0
votes
1
answer
118
views
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 ...
4
votes
0
answers
80
views
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 ...
3
votes
1
answer
157
views
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 ...
2
votes
2
answers
264
views
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 ...