# 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 257,965

REPUTATION**13,686**

CONTRIBUTIONS

**0** Questions

**6,404** Answers

ANSWER ACCEPTANCE **
0.00%
**

VOTES RECEIVED**2,304**

RANK**492** of 17,781

REPUTATION**3,235**

AVERAGE RATING**3.40**

CONTRIBUTIONS**5** Files

DOWNLOADS **51**

ALL TIME DOWNLOADS**31624**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**0** Highlights

AVERAGE NO. OF LIKES

**Content Feed**

cumulative sum table over group

Take a look at the grouptransform function.

2 days ago | 1

| accepted

Operator '*' is not supported for operands of type 'function_handle'.

b=0.4;c=11;d=6;e=130;f=10;m=1; % ... f = @(t,x) [a*x(2)+(0.2+0.2.*abs(x(4))).*x(3);b*((x(4).^2)-13).*x(3)-c*x(2);-d*x(1)-e*x(2...

3 days ago | 0

Automatic numbering and cross-referencing of sections in Live Script

Cross references: the Hyperlink entry in the first table on this documentation page indicates you can link to another location i...

3 days ago | 0

| accepted

How to delete a Matrix in a 3D Matrix?

Let's make a sample 3-D array with some NaN values. A = randi(10, 3, 3, 4); A(randperm(numel(A), 3)) = NaN % Make 3 random val...

3 days ago | 0

picking a random number in a range

Do you want a random integer value or just any old number between 1 and 69? The next time you draw a random number, are you goi...

4 days ago | 0

Can anyone help me with this in matlab

if you could help me with the link between the days and the temperature per example Okay, so you need help assembling the vecto...

4 days ago | 0

| accepted

Why does lu function yield different lower triangle matrix if I return [L,U] rather than [L, U, P]?

From the documentation page for the lu function: "[L,U] = lu(A) returns an upper triangular matrix U and a matrix L, such that ...

4 days ago | 0

Readtable is not reading my delimiter and datetime columns correctly

You might want to use the interactive Import Tool to read in your data. This will let you select how the data is delimited / sep...

4 days ago | 0

Performing calculations for specific values in a table defined by certain values from another column (Date)

Since you have time-based data I'd store it in a timetable array instead of a table array. If you do, you can use retime to aggr...

4 days ago | 1

How can i display a vector on Matlab that does the follwing

I suspect this may be part of a homework assignment so I'm not going to give you the answer. But I believe the section on "Vecto...

4 days ago | 0

readtable() custom variable names

If you're using release R2020a or later I would use the renamevars function.

4 days ago | 0

Function inside the function

r=@(s,z) sqrt((s+s0).^2+(z+z0).^2); I'm assuming you've defined s0 and z0 before you run this line to define r. Ds=@(r,s)(c0x+...

4 days ago | 1

Extend a cell array of dates (from days only, to hours and days) in a compact way

I'd probably take advantage of implicit expansion for datetime and duration arrays, introduced for those types in release R2020b...

5 days ago | 0

Is there an official page that gives the MATLAB and associated/compatible Simulink version numbers ?

Since you're asking about compatibility, version numbers are not the right tool to use. The supported workflow is to use the ver...

5 days ago | 0

Can I define a specific method to run upon loading obj from mat file?

From the documentation section talking about how to customize object saving and loading, overload the loadobj method.

5 days ago | 0

How to calculate inverse of 3d array matrices with size 3*3*18 ?

If you're using release R2022a or later you could use the pageinv function. But if you're planning to invert these matrices in o...

5 days ago | 1

Dear Sir,There are only limited options or tools in trial version of librarires of R2022a trial version

I suspect that most if not all of the blocks you're trying to use are part of Simscape Electrical. Check the output of the ver f...

5 days ago | 0

How to save figures using mkdir if paths are variables?

Functions in MATLAB that accept text data can be called in one of two ways: command form or function form. Let me show you each ...

6 days ago | 1

| accepted

Using stem plot for two plots

This looks like a reasonable plot to me. T=4e-3; n=21; x=linspace(0,T/2,2001); x1=linspace(T/2,T,2001); y=sin(pi*x/T); y1=(...

6 days ago | 0

using same variable for two separate button to run and show the output

There's no variable named t in the workspace of the plotButtonPushed function. If you had used app.t in that code, that would r...

7 days ago | 0

Moving Average with Variable Window Size

See the "Sample Points for Moving Average" example in the documentation page for movmean. While that example has uniformly space...

7 days ago | 1

| accepted

Phase Portrait of ODE system

You could use ode45 with the 'OutputFcn' option set to @odephas2 using odeset, as shown in this Answers post.

7 days ago | 0

Which file Matlab selects if two different files with the same name are put under two folders, which are both added via addpath?

See this documentation page for a discussion of the function precedence order.

7 days ago | 0

Matlab plot3 not giving a 3D plot

Since no axes existed when you called hold on, MATLAB created one using the default 2-D view and "locked" that axes property in ...

8 days ago | 0

| accepted

Mean and Median of Values in a matrix

Take a look at the groupsummary function.

8 days ago | 0

Error using crossvalind (line 131) Not a valid method.

According to the documentation page for crossvalind the value of the first input (listed as cvMethod on that page) that selects ...

8 days ago | 0

Computing mean by group (need help with speed!)

Since this question was asked (in release R2018b) we introduced the grouptransform function. I believe using the 'meancenter' me...

8 days ago | 0

Create structure from string name / Rename structure from string name

Use a fixed name for your struct and user-specified names for the fields, then when you save it use the -struct option. Let's ge...

9 days ago | 2

| accepted

creating a Dummy variable from a string vector

Use the string manipulation and/or set membership functions. Let's start with a random set of names: rng default D = ["Doc"; "...

9 days ago | 0