Community Profile # Steven Lord

### MathWorks

4,635 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

View details...

Contributions in
View by

assign categorical value for weekday variables
Since you have a timetable you can use the isweekend function to get true and false values (which you could convert to categoric...

4 hours ago | 0

| accepted

6 hours ago | 0

Redistribution of histogram type data in specified bins
>> x = randi(12, 1, 1000); >> h = histogram(x, 0:4:12); % Look at the histogram before running the next line of code >> h.B...

7 hours ago | 0

How to make a list of appearance
histcounts and histogram can handle categorical arrays. names = ["cat" "dog" "cat" "cat" "dog"]; animals = categorical(names);...

8 hours ago | 0

Something is wrong with my Matlab
A = [x x x; x y y; y -2z] b = [60 30 3]' I suspect this is supposed to represent the equations 3*x = 60, x+2*y = 30, y-2*z = 3...

1 day ago | 3

| accepted

Convert/copy array to different type of array (single to uint16 for example) bit by bit
Are you trying to typecast one of the variables into the other?

1 day ago | 0

| accepted

Variable from function to change value
What's the purpose of your function? Is it simply to score the set of dice (meaning that it's some other function, perhaps its c...

1 day ago | 0

Help calling my basic function
That is the correct and documented behavior. See the first Note on this documentation page. You could do this by either creatin...

1 day ago | 1

Python 3.8 interoperability
The Release Notes for release R2020b indicate that cPython 3.8 is now supported.

1 day ago | 1

Row unity in matrix
>> P = rand(9); >> NP = normalize(P, 2, 'norm', 1); >> sum(NP, 2) ans = 1 ...

2 days ago | 0

Index daily values in TT over many years to determine mean
Use groupsummary with the GROUPBINS input specified as "dayofyear".

2 days ago | 1

Can someone provide me the theory and math behind this function of eigen?
You might find the "Eigenvalues and Singular Values" chapter in Cleve Moler's Numerical Computing with MATLAB, available here, u...

2 days ago | 0

Can't figure out the error in my pcolor line, keep getting color data input must be a matrix error
Please run this command immediately before the line where you call pcolor and show us the output from just before the pcolor cal...

3 days ago | 0

| accepted

Error using barrier Objective function is undefined at initial point. Fmincon cannot continue.
What values do you receive when you evaluate your objective function fun at the initial values in the start field of the paramet...

3 days ago | 0

How to modify an anonymous function with another function
As written, y1sig and y2sig aren't function handles. You could make them function handles like this: f1 = @(d) sind(d); f2 = @...

4 days ago | 0

How I can correct this error? "Undefined operator '/' for input arguments of type 'function_handle'."
z=@(x) x(1)+x(2)+x(3)+x(4)+x(5); F1=@(x) 19720+(R*T*log(x(1)/z))-x(6)-4*x(7); You can't divide x(1) by the function handle z. ...

4 days ago | 2

| accepted

specifying the horizontal linetype '_' produces an error.
The horizontal and vertical line markers for plots were introduced in release R2020b. If you're using an older release you will ...

4 days ago | 2

| accepted

Property access in subclass
As you've defined A and B they are value classes but you're using them like they are handle classes. See this documentation page...

4 days ago | 0

| accepted

Error using odearguments with a symbolic system of differential equations
Your ODE function can use symbolic calculations internally but it must return a double or single array to the ODE solver. Call d...

5 days ago | 0

| accepted

I can't find the mistake in the code
I've seen two different conventions for representing polynomials as vectors of coefficients. The one used by functions like poly...

5 days ago | 0

| accepted

How to extract input variable name when calling to GUI (GUIDE) function?
If you want your app to display the name of the file that was loaded, you should probably have your app accept the filename rath...

5 days ago | 1

System Error (MATLAB R2019a) after update

6 days ago | 1

| accepted

Why do I get these errors in Toolbox package? Help me out
The MCR directories in the directory for MATLAB Compiler should not be on the MATLAB path. If you've added toolbox\compiler\mcr ...

6 days ago | 0

| accepted

Error using 'pi' too many input errors with my equation
You're missing * operators after the two calls to pi on the line where you define y, just like you did on the lines where you de...

7 days ago | 0

| accepted

Even binned histogram to uneven bins?
Let's make some sample data. x = randi(255, 1, 1e5); Use bin edges that are the squares of the integers between 1 and 16. Each...

7 days ago | 0

Error using subplot using for loops: subplot index too large
Set a conditional breakpoint on the line where you call subplot. The condition is nVals1*4 < indexplot. Run your code. When MATL...

7 days ago | 0

Array of Structures (not structure array)
Consider a struct whose fields are themselves struct arrays. arr.asdf = struct('A', 3, 'B', 2); arr.zxcv = struct('A', 7, 'B',...

8 days ago | 1

| accepted

Unable to use CTRL+R to comment
Open the Preferences using the button in the Enviroment section on the Home tab of the Toolstrip. In the MATLAB section of the p...

8 days ago | 0