94,536 questions
Advice
1
vote
2
replies
147
views
How to calculate the average value of a vector in MATLAB?
I am a first-year engineering student learning MATLAB for a programming course. Recently, I started studying vectors and basic statistical operations, and I am trying to calculate the average value of ...
Score of 3
2 answers
151 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
102 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 ...
Advice
2
votes
3
replies
140
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
69 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
56 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.
...
Advice
1
vote
2
replies
96
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).
...
Advice
1
vote
30
replies
225
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. ...
Advice
1
vote
4
replies
87
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 ...
Advice
2
votes
1
replies
77
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
82 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 ...
Advice
1
vote
0
replies
37
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 ...
Advice
2
votes
0
replies
39
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 ...
Best practices
2
votes
8
replies
105
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; ...
Score of 3
0 answers
64 views
How can I get edge information from matlab femodel programmatically
I am using matlab's pde toolbox and setup a geometry for femodel like this:
gd = [3 4 0 1 1 0 0 0 1 1]'; % Example: A simple square
sf = 'S1';
ns = ('S1')';
[g,bt] = decsg(gd, sf, ns)
fe = femodel(...