Community Profile

photo

Steven Lord

MathWorks

Last seen: Today Active since 2002

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

All
  • Treasure Hunt Participant
  • Scavenger Finisher
  • Thankful Level 5
  • Master
  • Solver
  • Personal Best Downloads Level 2
  • Editor's Pick
  • 36 Month Streak
  • 5-Star Galaxy Level 4
  • First Submission
  • Revival Level 3
  • Knowledgeable Level 5

View badges

Content Feed

Answered
Are the variables passing through ode45?
I recommend you not use global variables to share data between the ODE function and the function where you call ode45 with the O...

3 days ago | 0

Answered
Need Help With Function Creation and Integration
What do you know (and have fixed values for) and what are you trying to integrate over? Since nowhere in the code for the funct...

3 days ago | 0

Answered
Why does expm command work too slow?
Do you absolutely need the result as a (potentially very long) symbolic expression in t, or is computing this matrix exponential...

3 days ago | 0

Answered
Why does MatlabR2023b frequently crashes when generating figures
Searching the Bug Reports for release R2023b for "crash" in the MATLAB product I find seven hits, but none of them seem like the...

3 days ago | 0

Answered
How I would determine if a string contains multiple substrings?
myString = "This has some words in it."; s = split(myString) whichWordsAreIn = ismember(["some"; "in"], s) allWordsIn = all(w...

3 days ago | 0

Answered
Audio Toolbox transcribe not working even with toolbox and license
Looking at the documentation page for the speech2text function, I see a Note in the Decription section that looks relevant. "To...

4 days ago | 0

Answered
The code runs when if I do; newton_recur(@(x) x^2,@(x) 2*x,1,10) but wont work if I leave out the @(x). is there a way to do this so that the user doesn't need to add @(x)?
You mean you want the user to enter 'x^2' and '2*x' and automatically generate the anonymous functions? Take a look at the vecto...

4 days ago | 0

Answered
How to Convert data from HEX codes to Numeric
Do you mean you have the hex representation of a double precision number and want to convert it into the corresponding double? S...

4 days ago | 0

Answered
How to count the occurrence of numbers in certain value range (show 0 if no occurrence)
If your data is sorted you could use histcounts. In the case of your sample data, where all the values are integers, I'm going t...

4 days ago | 1

Answered
Matlab generate normal random sample with outliers
warning('off','all') Seeing this in the code smells bad. If you want to select a different element each iteration (and have en...

4 days ago | 1

| accepted

Answered
Using repelem to vertially concatonate non-numeric variable
Note that the for loop approach from @Atsushi Ueno works if the "pieces" of the names are the same length all the way down the l...

4 days ago | 0

Answered
i want to find k for different values of w using determinants, after that i want to find y2 for the different values but y2 cannot be executed
w is a vector. w=1:3 y1(j) is a scalar. For purposes of this example I'll show a "dummy" y1 vector. y1 = [4 5 6]; j = 1; y1...

4 days ago | 0

| accepted

Answered
How do i fix my newtons method code?
There is one obvious syntax error, one functionality error, and one change I strongly recommend. Recommended change On the lin...

4 days ago | 2

Answered
How to change a parameter of an objective function during optimization of simulated annealing ?
Now, my objective function has an extra parameter, in addition to the independent variables, which is a variable that I want to ...

4 days ago | 0

Answered
Error with fmincon Unable to resolve the name 'optim.coder.validate.checkProducts'.
What does this command show? which -all fmincon And do you have MATLAB Coder installed? I suspect the answers to those two que...

5 days ago | 0

Answered
How to center the bars of the histogram over the elements of the input array?
thanks a lot @Star Strider, but why do we get frequency = 5 for x = 4 ? Shouldn't it be frequency = 2 for x = 4? BinWidth and ...

5 days ago | 2

| accepted

Answered
Inverse Matrix for 6x6 matrix with variables
The symvar function does not define symbolic variables. It identifies identifiers in an expression (other than those in a small ...

6 days ago | 0

Answered
Error Not same Vector length why not functioning
Just as a guess, did you expect this to create a 20 element vector whose first element is 0 and whose last is 2001? t1 = linspa...

6 days ago | 0

| accepted

Answered
How to know exactly what row (or index number?) in a table based on user input?
If you had a timetable array, you could either use the == operator as others have suggested or create a timerange (if you need t...

6 days ago | 0

Answered
problem axis "x" in my graph
Those seem reasonable to me. They're showing the month and date along with the time of data for each of your X coordinates. I su...

7 days ago | 0

Answered
Help with axes labels on histogram plot
If you want the labels to be only in the center of the bars, use the BinEdges property of the histogram to compute where the tic...

7 days ago | 0

Answered
Problem to call fitcecoc with Matlab runtime
If you are attempting to compile code using MATLAB Compiler that calls load to load an object from a MAT-file and there is no in...

8 days ago | 0

Answered
MATLAB built-in examples not opening and giving error
According to the Release Notes for Simscape Electrical, the names of the example models and/or the way you access them changed i...

10 days ago | 1

| accepted

Answered
Load data and store in workspace in individual variables
Can you dynamically create variables with numbered names like x1, x2, x3, etc.? Yes. Should you do this? The general consensus ...

10 days ago | 0

Answered
"Invalid use of operator." doesn't go even after trying various solutions :(
That doesn't match any of the allowed syntaxes shown on the for keyword documentation page. If you want the code to run only if...

11 days ago | 0

Answered
Error using sym/subs Too many input arguments. Error in mx_model (line 176) f = subs(f, cup,cu,0);
In the past the subs function for symbolic expressions did accept four inputs. The last input controlled whether or not we tried...

12 days ago | 1

Answered
Error Saving figure: Error using sprintf: Conversion to text from matlab.ui.Figure is not possible.
Your full error message references line 63 in the savefig function, which in the savefig function included in MATLAB: which -al...

13 days ago | 3

| accepted

Answered
while closing the GUI in MATLAB 23a give following error
You could wrap that set call in a try / catch block and check if the handle to the text box isvalid in the catch block. If it is...

13 days ago | 1

| accepted

Answered
How to build polynomial with cscvn function coeffs?
If you want to evaluate the spline, don't try to make polynomials. Just use the output argument from your call to cscvn with the...

17 days ago | 0

Answered
Array indices must be positive integers or logical values.
Did you mean r*(1-tau) instead of r(1-tau) in the command in the innermost for loop?

17 days ago | 0

| accepted

Load more