94,506 questions
Score of 3
0 answers
209 views
How can I preserve MATLAB vectorized Monte Carlo code performance when migrating to C++?
I'm migrating a stochastic simulation codebase from MATLAB to modern C++.
A common pattern throughout the code is large vectorized operations such as:
X = randn(N,M);
Y = exp(mu + sigma .* X);
payoff =...
Score of 3
0 answers
62 views
GridAlpha/FaceAlpha on contourf + bar tiles rendered as solid opaque lines when exporting to EPS (works fine in PNG/PDF)
I have a MATLAB (R2024a) figure combining bar charts and filled contour plots (contourf) in a tiledlayout, with a semi-transparent grid overlay (GridAlpha) on the contour tiles.
When exported with ...
Score of 1
0 answers
92 views
How to form forward looking sonar images from scene in Matlab? [closed]
I am currently working on sonar simulations and have modified the following code:
https://uk.mathworks.com/help/phased/ug/underwater-target-detection-with-an-active-sonar-system.html
Modifications ...
Score of 3
2 answers
202 views
How to automate insert large symbolic MATLAB expressions as native Word equations?
I am working with the Symbolic Math Toolbox in MATLAB and deriving very large and complex symbolic expressions. Manually retyping these into Microsoft Word's equation editor is not only tedious but ...
Score of 2
0 answers
112 views
Overriding the default disp() scientific notation threshold for heterogeneous data (structs, matrices) in App Designer
I am developing a calculator in MATLAB App Designer that outputs results to a `uitextarea`. The output can be anything from a simple scalar to a complex matrix or a nested `struct` returned by ...
Score of 0
1 answer
157 views
How to use XML files in MATLAB?
I'm trying to use an XML file as a look up table in my MATLAB script. I have an array of numbers, and each of these numbers are also in the XML file and correspond to a specific label. I want to ...
Score of 1
0 answers
72 views
How to connect MATLAB to a DolphinDB stream table?
I'm working on a quant strategy where DolphinDB has a real-time stream table on the server side, and MATLAB needs to subscribe and consume the data for downstream computation. Looking for a solution ...
Score of 1
0 answers
64 views
Implicit finite difference scheme in MATLAB for 1D Mobile-Immobile Model (MIM) with linear sorption and degradation
I am trying to write a MATLAB code to solve the 1D Mobile-Immobile Model (MIM) for solute transport in porous media. My model includes both linear sorption (retardation) and first-order degradation.
...
Score of 0
2 answers
115 views
How to convert output of pwelch() into amplitude response in MATLAB
I have a simple sinusoid with amplitude of 1, but pwelch() gives me a different peak value.
As far as I know, Welch's method is just an averaged squared DFT with a window function (Hamming in MATLAB).
...
Score of 0
8 answers
238 views
Algorithm for heterogeneous frequency range discretization
Let's say I'm modeling a bell-shaped spectrum of a conditional signal. I already have the boundary values of the frequency range (start and end) and I know the frequency of the spectrum's maximum. ...
Score of 0
2 answers
105 views
How can I find the J-point in an ECG in Matlab?
Good morning, I'm writing my thesis on ECG signal acquisition and processing. I'm using the ICARE dataset. I'm currently researching Matlab codes that could help me with the processing. I specifically ...
Score of -1
1 answer
92 views
Recovering a conversation from an audio with a lot of noise using MATLAB
I am working on a personal project to recover a human conversation from an audio file using MATLAB, but after careful inspection, I've realized that it might be close to impossible, as the noise ...
Score of 0
0 answers
84 views
How to code switching Neumann-Dirichlet upper boundaries for 1D Richards' equation using implicit finite difference?
I am solving the 1D mixed-form Richards' equation in MATLAB using a fully implicit finite difference scheme (Picard iteration).
The governing equation is:
enter image description here
(Note: My z-axis ...
Score of 0
0 answers
41 views
r2 from wblplot (built-in function)
Using the built-in function wblplot (https://uk.mathworks.com/help/stats/wblplot.html#d126e1264612) to analyse some data.
How do I quantify the goodness of fit (e.g. r^2) of the plot it produces? The ...
Score of 0
0 answers
41 views
Linking to DNG requirements on a specific stream
Is direct linking from MatLab to DNG requirements done using OSLC links?
If so, I was assuming that once you created the OSLC links to the appropriate DNG requirements, to select your DNG stream, you ...