# 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**13**

of 265.168

REPUTATION**14.430**

CONTRIBUTIONS

**0** Questions

**6.727** Answers

ANSWER ACCEPTANCE **
0.00%
**

VOTES RECEIVED**2.443**

RANK**495** of 18.114

REPUTATION**3.247**

AVERAGE RATING**3.40**

CONTRIBUTIONS**5** Files

DOWNLOADS **33**

ALL TIME DOWNLOADS**31746**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**0** Highlights

AVERAGE NO. OF LIKES

**Content Feed**

Add Text Subscript to Table string

You don't. The text in the table doesn't have any sort of formatter or interpreter associated with it; it's a collection of char...

etwa 13 Stunden ago | 0

Problem with function handle array evaluation

Define two helper functions: apply = @(fun, x) arrayfun(fun, x, 'UniformOutput', false); stack = @(x) vertcat(x{:}); Now let'...

etwa 16 Stunden ago | 0

| accepted

Error about preallocating for speed

Those lines of code don't error. When Code Analyzer analyzes your code it issues a warning about those lines indicating that the...

etwa 17 Stunden ago | 0

i need help with the matlab assigment i have done all the part but i just need to store them in vector and display the user output number and all its divisors in a meaningful

sum = 0; You should use a different name for this variable, as sum already has a meaning in MATLAB. x = input ( 'please input ...

ein Tag ago | 0

I am not able to get the answer for the following code, I am using golden search section method.

You define a function named gss but you never call that function. Also, I would remove the first three lines of your code. clc...

ein Tag ago | 0

How make the number of columns of two matrices equal?

There are a number of possibilities. Off the top of my head: You could discard 1100 columns of the second matrix (the first 110...

ein Tag ago | 0

Unrecognized function or variable 'sum'.

It seems that matlab is trying to evaluate sum as a variable instead of a function. That is correct, because in the method it i...

2 Tage ago | 0

How do I solve a triple integral with one integral limit in function of another variable

See the "Integral over the Unit Sphere in Cartesian Coordinates" example on the integral3 documentation page for an example of h...

2 Tage ago | 1

GUI crashes when using eigs with a nonzero shift on a large generalised eigenvalue problem.

Please send the crash log file along with the code and data with which you can reproduce the crash to Technical Support directly...

2 Tage ago | 0

How to plot data point by point and erasing the last one?

Instead of creating two new scatter plots each step (one to cover the previous point in white, the other to create the new point...

3 Tage ago | 0

Rounding towards zero or from zero

The tiebreaker methods only apply when the quantity to be rounded is halfway between the two numbers to which it could be rounde...

3 Tage ago | 0

How do I pick a number from a set of random numbers?

Since I suspect this is part of a homework assignment I'm not going to give you the answer, but I will point you toward two func...

3 Tage ago | 0

Efficient way to solve an equation in MATLAB

Solve numerically using fzero. Here I've written a function handle that itself makes function handles. I can pass that generated...

4 Tage ago | 1

| accepted

How to find parent uifigure for a child several layers down

Use ancestor. >> f = uifigure; >> h = uipanel('parent', f); >> f2 = ancestor(h, 'matlab.ui.Figure'); >> f == f2 ans = ...

6 Tage ago | 1

| accepted

if and sum not working together

Please try this little experiment. Find something to write with and something to write on (ideally compatible things; pencil and...

6 Tage ago | 1

Would like a script that removes repeat data

Dates_Wrong = ['2/4/21';'2/5/21';'2/5/21';'2/6/21';'2/7/21'] dt = datetime(Dates_Wrong, 'InputFormat', 'M/d/yy') differences =...

6 Tage ago | 0

| accepted

Equality between 2 floats not recognized when using <= relational operator

I searched it up and apparenty it's to do with matlab not storing floats very accurately, No, that is not the cause. Are the n...

7 Tage ago | 1

divide year time data into days and nights

I'm going to use the sunrise and sunset times for Natick, MA for this example. I'll create some random datetime values for the n...

7 Tage ago | 2

APP Designer code convert to CPP code

If upgrading to a release (R2020a or later) that includes Simulink Compiler is an option, you might find the workflow on this do...

7 Tage ago | 0

How to obtain the piecewise expressions of spline fit obtained using MATLAB's command spapi?

i want to obtain the expression and calculate it derivatives further. Do you need the actual expression, or do you just want to...

7 Tage ago | 1

Add code to have switch repeat if a case is not met

You can simplify your switch call so you don't have to include 2^(number of letters) cases each with a different combination of ...

8 Tage ago | 0

installing two MATLAB versions at same time.

It is possible to have multiple versions of MATLAB installed on the same machine at the same time. Just don't install them both ...

8 Tage ago | 0

I need to understand what's the mistake and how to define vector

When MATLAB runs line 7 of your code, it tries to access the second element of the variable u (or to call a function named u wit...

8 Tage ago | 1

How to reduce the file size of a saved histogram figure

You could avoid creating the histogram using the data by specifying 'BinCounts' and 'BinEdges'. If you do this, there won't be a...

9 Tage ago | 1

| accepted

Is it possible to generate a Mex function which has within it another mex function?

I'm not 100% certain but if you're trying to generate code using MATLAB Coder on a file that calls a MEX-file, you may be able t...

9 Tage ago | 0

Join strings together with '_' between them

Use the string append operator +. a = {'A11';'A12';'A21';'A22';'A23';'A24'}; b = {'A300';'A5300';'A291';'A5291'}; C1 = a + "_...

9 Tage ago | 1

Identifying if reaction times are 3 standard deviations away from mean

Take a look at the "mean" method for the isoutlier function.

9 Tage ago | 0

Translate sine coding? Need understanding

To start off, I suggest you start with the free MATLAB Onramp tutorial to quickly learn the essentials of MATLAB. Then work you...

10 Tage ago | 1

How to fix the large and mad fractions when dealing with symbolic vars

Symbolically, use vpa or double or use the sympref function to change the FloatingPointOutput preference. Numerically, if you w...

10 Tage ago | 1