94,500 questions
Score of 2
1 answer
78 views
How to convert a genome-scale model in .json format into an SBML/MATLAB file (.xml/.mat format)
I have a genome-scale metabolic model (a.k.a. GEM) made by other people who are not a part of my lab, and I would like to use it. The problem: it is in the .json format, and I need it to be in the ....
Score of 3
0 answers
248 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
70 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 3
2 answers
214 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
113 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
164 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
76 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
67 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
117 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
2 answers
115 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
94 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
88 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
42 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
45 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 ...
Score of 0
1 answer
122 views
Aggregate multiple columns by the sum of next column
I want to create a data matrix in Matlab, aggregating/grouping data of two columns and by the sum of a third column.
For example given the next data matrix x:
game=[1;2;3;1;2;3;1];
Money=[0 ;5; 6; 0; ...