Community Profile

photo

Steven Lord


MathWorks

3,097 total contributions 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.

Steven Lord's Badges

  • Ace
  • 12 Month Streak
  • Revival Level 3
  • Thankful Level 3
  • Knowledgeable Level 4
  • First Answer
  • Scavenger Finisher
  • Solver

View details...

Contributions in
View by

Answered
Double integration using dblquad not working
The function you pass into dblquad must return a double or single value. It cannot return a sym object. To compute a double inte...

2 days ago | 0

Answered
Use subplot command to make 3+ Vertically Stacked Plots
This question was asked before this function existed, but if you're using release R2018b or later try the stackedplot function.

3 days ago | 0

Answered
Calculate the hourly battery capacity
We can determine the sizes of some of the variables you've defined in this code from what you've shown, but others we cannot. In...

3 days ago | 0

Answered
For objects in some hierarchy, what is the best practice for parent-child methods/properties that define the relationship? (ALT: is the arm-bone connected to the hand-bone, or vice versa?)
In your hierarchy, do you inherit or compose? In this case composition (having the Forearm object contain a property that isa Ha...

3 days ago | 0

Answered
NET.addAssembly is a script, not a function, in MATLAB 2019a
From the error message (specifically the "MATLAB_R2019a.app" part of the path to the NET.addAssembly function) you appear to be ...

3 days ago | 0

| accepted

Answered
test parameters persist after suite ran
If you're using release R2018b or later, you can use external parameters in your parameterized test. I believe that will allow y...

3 days ago | 0

Answered
Replication factors must be a row vector of integers or integer scalars.
If you want to replicate w so it has exactly a elements, I recommend doing two things. Let's operate on some very simple sample ...

4 days ago | 0

Answered
How to fix the missing patches that turn into NAT?
The fillmissing and/or retime functions (retime if you're storing your data as a timetable, fillmissing if your data is a vector...

4 days ago | 0

Answered
second largest peak value
Use the islocalmax function with the 'MaxNumExtrema' option.

4 days ago | 1

Answered
I'm trying to acess Hybrid Electric Vehicle P2 Reference Application in Powertrain Blockset but it is not opening in Matlab?
From the Release Notes it appears that reference application was introduced in release R2018b. The Release you've tagged this po...

4 days ago | 1

Answered
'Out of memory. The likely cause is an infinite recursion within the program.
Guillaume is correct. You've written your own isrow.m that shadows the built-in isrow function. The fileparts function that is ...

5 days ago | 0

| accepted

Answered
Using Property Blocks : Set/get on properties within a single property block
I second some of Jan's suggestions about perhaps packing the properties into a table array (or maybe a struct, vector, or even a...

5 days ago | 1

Answered
Plot against varying index
If you look at the Description section of the plot function documentation page, you're using the fifth syntax for plot: "plot(Y...

5 days ago | 1

Answered
Error function plot with two variables
The fplot function is not the right tool for this job. Its documentation states that when called with one symbolic input it "plo...

5 days ago | 0

Answered
Singular matrix and MATLAB inversion
DON'T use det to determine if a matrix is singular! A non-zero multiple of the identity matrix isn't singular, right? A = 0.1*...

6 days ago | 1

| accepted

Answered
Easy way to change callback function
It sounds like you want to customize the text that appears when you have data cursors enabled, or that's one way you could achie...

6 days ago | 1

Answered
How to make matlab count
If you want the frequency of one particular element from the matrix, use the techniques madhan ravi, Alex Mcaulley, and Star Str...

6 days ago | 0

Answered
Calculate the total average daily load
The retime function requires the first input to be a timetable array. From this line of code: Power_Ah=Dataclean_interpolated.I...

6 days ago | 0

| accepted

Answered
Matlab Novice here - struggling to truncate a column array
If the data is of a fixed with convert it from a cell array containing char vectors into a string array and use extractBetween. ...

6 days ago | 1

| accepted

Answered
timer function is not executing the function i am providing ,please help me with this?
t=timer('timerfcn',ritik,'startdelay',2) This attempts to call the ritik function with 0 input arguments and 1 output argument ...

7 days ago | 0

Answered
How to only collect real part of the cube root
Use the nthroot function. With this you can replace your loop with element-wise operators and process your whole vector of data ...

7 days ago | 1

| accepted

Answered
I need some help with arrayfun
I don't think arrayfun is the tool you want to use here. Instead groupsummary seems like a better fit.

7 days ago | 0

Answered
empty sym: 0-by-1.
Don't pass a char vector into solve. Build a symbolic equation and pass that into solve. syms x b = 0.45; eq = x-sin(x) == b ...

8 days ago | 1

| accepted

Answered
No output in the standalone executable matlab
Symbolic Math Toolbox is an ineligible product for MATLAB Compiler. As stated on that page, "this means that an application or c...

8 days ago | 0

Answered
Integration error - "integrand F must return a single, real-valued vector of the same size as the input" - even when the integrand DOES return such a vector
For what it's worth, when I defined your functions (with lB equal to 1, since you didn't specify a value) and called integral on...

10 days ago | 0

Answered
Using the switch statement inside the for loop.
It's still not really clear, but what I think you want is for your function to infer or deduce which type of problem you're tryi...

10 days ago | 0

Answered
Simulink Onramp does not work
Steps 2 and 3 are not instructions on how to download and install Simulink Onramp. They are instructions for how to use it once ...

10 days ago | 0

Answered
How to delete a rows in a timetable for the rows (dates) that are not trading days?
Don't check each individual element of the timetable array's times individually. Let's make a simple timetable on which to opera...

11 days ago | 0

Answered
Update time/date in a for loop
I would use datetime and string. mydate = 20190606; % Current yearmonthday (8 digits) myrun = 06; % Cur...

11 days ago | 0

| accepted

Answered
Remove non time string values in a time matrix
These don't strike me as being datetime values, they're duration values. The same technique others have suggested (try convertin...

12 days ago | 0

Load more