
Steven Lord
MathWorks
I joined The MathWorks in the Technical Support department during the summer of 2001 and transferred into the Quality Engineering department in March of 2004. I now work qualifying the core MATLAB numerical functions (PLUS, MINUS, LU, FFT, ODE45, etc.)
Professional Interests: mathematics, MATLAB
For assistance with MATLAB question please post to MATLAB Answers or contact Technical Support using the Contact Us link in the upper-right corner of the page instead of contacting me directly.
Statistics
RANK
14
of 260,606
REPUTATION
13,932
CONTRIBUTIONS
0 Questions
6,507 Answers
ANSWER ACCEPTANCE
0.00%
VOTES RECEIVED
2,363
RANK
493 of 17,907
REPUTATION
3,240
AVERAGE RATING
3.40
CONTRIBUTIONS
5 Files
DOWNLOADS
37
ALL TIME DOWNLOADS
31673
CONTRIBUTIONS
0 Posts
CONTRIBUTIONS
0 Public Channels
AVERAGE RATING
CONTRIBUTIONS
0 Highlights
AVERAGE NO. OF LIKES
Content Feed
Generate an 8-day datetime array between 2010 and 2021 which resets the 8-day count at the beginning of each year
Let's start with a row vector of January 1sts. Jan1st = datetime(2010:2021, 1, 1); We want to compute a vector of days for eac...
8 hours ago | 0
| accepted
extract data from one day from a timetable
Use a timerange. First generate some sample data with datetime values representing random hours in July 2022. rng default % for...
9 hours ago | 0
Matrix formulation with matrix multiplication and raising to N-power
If your B is in fact a 2-by-1 vector: B = [0.005; 0.1] then you cannot concatenate it horizontally with 0 as they don't have t...
9 hours ago | 0
| accepted
How to make assert() debug break?
Based on Jan's description (I have not read the code) you'd also want to think about what this does if you call assert1 at the M...
11 hours ago | 1
| accepted
100% CPU usage on Windows 7 for R2022a
The System Requirements page lists the supported Windows operating systems for release R2022a as Windows 11, Windows 10 (version...
11 hours ago | 0
How to create a surface from node coordinates and face indexes?
Does the trimesh function do what you want? Alternately take a look at the griddata function and then the isosurface or contour...
20 hours ago | 0
How to return empty vector of figures
Preallocate the array using gobjects. F = gobjects(1, 3) F(2) = figure; F To check if an element has been filled in, ask if ...
1 day ago | 0
Data splitting and saving to different variables
Can you dynamically create variables with numbered names like x1, x2, x3, etc.? Yes. Should you do this? The general consensus ...
1 day ago | 0
sometimes datastore read() function reads number of lines different than 'readsize' parameter
If you look at the description of the ReadSize property of the tabularTextDatastore class, the sentence describing the behavior ...
1 day ago | 0
Install Matlab engine for Python on MacBook M1
If you are using the MATLAB R2022a Native Apple Silicon Platform Open Beta, one of the limitations listed on that page is "MATLA...
2 days ago | 0
When using ind2rgb, how do you use map as output argument?
The map input to ind2rgb is the colormap for the image. The first input to ind2rgb represents indices into that colormap. So for...
4 days ago | 1
| accepted
Using graph theory inside Simulink
Some of the "Graph and Network Algorithms" functions in MATLAB support the C/C++ Code Generation extended capability, as you can...
4 days ago | 0
Why 'NaT' (class: datetime) does not work with find function?
The reason why isnat works and your == call did not is because NaT is like NaN -- it is not equal to anything, not even another ...
5 days ago | 2
Create array of results for summation where limits are not the same
I don't have your data so I can't run the code, but something along these lines should work. I use groupsummary to summarize (in...
5 days ago | 1
| accepted
What is a handle?
What's the context in which you see that term? There are at least three different meanings for that term, though two of them are...
5 days ago | 3
| accepted
Error creating structure field names with a for loop
The first character of a struct field name must be a letter. Later characters can be digits, but not the first one. You could s...
5 days ago | 1
Index exceeds the number of array elements - Error message
x = 1:10 y = reshape(x, 2, []) m = mean(y, 1) % mean of each column; "collapse" dimension 1 to size 1 by taking the mean m2 =...
5 days ago | 0
create index to graph and find isomorphism
Can you dynamically create variables with numbered names like G1, G2, G3, etc.? Yes. Should you do this? The general consensus ...
5 days ago | 0
| accepted
Create Structure from cell array with dot separation in string
s = 'em1500.eta_t.x'; f = split(s, '.') At this point you may want to use matlab.lang.makeValidName to ensure the field names ...
5 days ago | 0
Create a time array
val=['17-10-58_086' '17-11-09_923']; val = string(val); Convert the string array val into a format the duration function ...
5 days ago | 1
| accepted
Is "DSP System Toolbox Support Package for ARM Cortex-M Processors" available for Matlab R2022a?
The Release Compatibility information for that support package states that it is compatible with release R2014a through R2018b. ...
5 days ago | 0
Is there a reason why row vectors are default in Matlab?
Both the "A History of MATLAB" article that Cleve Moler and Jack Little wrote that was published by the ACM (see this blog post)...
5 days ago | 2
How can I get randperm function to calculate assigned percentage and values?
Let's look at a slightly smaller problem. A = zeros(10); numElements = numel(A) numDesired = ceil(0.25*numElements) elements...
6 days ago | 1
Can't import matlab.engine for python on M1 MAX chips after I successfully installed the matlab engine.
The page for the MATLAB R2022a Native Apple Silicon Platform Open Beta states, in part, that "MATLAB Engine API for Python is no...
6 days ago | 0
How to create answers to a calculation in an array in a forloop ?
Use discretize to generate the index vector then pass those index / group indices into groupsummary as the grouping variable and...
6 days ago | 0
How are propagation points connected?
The plot function connects the points you specify with straight lines. As the number of points you plot increase the curve looks...
6 days ago | 0
Warning: Imaginary parts of complex X and/or Y arguments ignored.
You probably want to recheck your units, do some dimensional analysis. Note that at the top of the Y axis that 1 unit on the Y a...
7 days ago | 1
Creating a variable that denotes a range of values
x = 4*rand(10, 1); edges = (0:0.05:4); y = discretize(x, edges, 'categorical'); results = table(x, y) Or if you want more co...
8 days ago | 0
| accepted
why I get the error "function 'lsqcurvefit' not supported for code generation" when using Matlab Coder?
Not all functions in Optimization Toolbox support being converted to C or C++ code using MATLAB Coder. In the most recent releas...
8 days ago | 1
One hop nearest neighbor in a graph
Find the neighbors of the node in the undirected graph then compute the distances between the specified node and its neighbors. ...
8 days ago | 1