Community Profile

# 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

All

#### Content Feed

View by

Fast creation of vector [0 0 1 1 2 2 3 3... n n]
n = 5; x1 = repelem(0:n, 2)

19 hours ago | 1

what is the codes of this equations？
You probably want to define your kets as vectors. Since you're taking infinite sums you probably want to define them as symbolic...

20 hours ago | 0

Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parenthe
This is not valid MATLAB syntax. I've commented it out so that later lines of code in this answer can run. % fun = @(x) (0.00 0...

22 hours ago | 0

How do you use the solve function in a mat lab GUI?
Are you attempting to define app.c and app.t as symbolic variables using these lines? system app.c system app.t That won't w...

22 hours ago | 0

An alternative to cell array
You say that you need to call this function many times, but do you need the M output from each of those calls to exist in memory...

22 hours ago | 0

Histogram set custom DisplayOrder
Specify the valueset in the order in which you want the categories to be listed when you construct the categorical array. BTW, ...

1 day ago | 0

| accepted

How to use matlab to achieve multiple cycles, as shown in Figure 1
Another approach would be to take advantage of the fact that a for loop in MATLAB can iterate over columns of an array. for ij ...

1 day ago | 0

How can I access char elements from the beginning up to some fixed index of the char?
The extractBefore function will work both for char arrays and strings.

2 days ago | 0

How to get a complete list of class properties including private properties.
Create a metaclass object and iterate through the PropertyList.

2 days ago | 0

| accepted

finding singular outliers in the presence of data with steep changes but not singular
I think the outlier detection and removal functions in MATLAB are the right tools for you to use. Choosing the right parameters ...

3 days ago | 0

| accepted

Unable to perform assignment because the left and right sides have a different number of elements.
MATLAB has a suite of debugging tools you can use to investigate errors like this. One of the ones I use most frequently is the ...

3 days ago | 0

Can the efficienty of this code be improved, either computationally or just in terms of lines of code?
A = [2; 4; 1; 2; 2; 4; 1; 2; 2; 4]; B = [4.10047; 7.44549; 3.62159; 6.56964; 2.87221; 4.51231; 4.01697; 5.60534; 5.5440; 7.0780...

4 days ago | 0

Helix/dipoleHelix in MATLAB R2016b version
This function is part of Antenna Toolbox. Check the output of the ver function to see if you have this toolbox installed. If you...

4 days ago | 0

| accepted

Add-ons not available for MATLAB Home
On the MATLAB Home page click the "Customize and buy" button. This will bring you to the store that gives you a list of add-on p...

4 days ago | 0

| accepted

Variable marker size scatter plot
The size input argument to the scatter function can be a scalar or an array of the same size as the coordinate data. In the exam...

4 days ago | 0

| accepted

This section of code, as originally written, assumes you're on Linux or Mac. We can make this a bit more platform independent. ...

4 days ago | 0

How to rename a lot of mfiles in a folder
Let's look at a simple example of what's in the temporary directory. D = dir(tempdir) What's the first file (or "file") in tha...

5 days ago | 0

can someone give me an example of what a "vector composed of characters" looks like exactly?
A = 'orange' A is a vector of type char. It has 1 row and 6 columns. If you're working with multiple pieces of text data and y...

5 days ago | 0

How do I exit a for loop after logical index is found true in an array?
continue exits the current iteration and proceeds to the next iteration. break exits the loop entirely.

5 days ago | 0

why my variable value become these sysbols?
When you concatenate together a char vector and a number, MATLAB does not convert the number into its character representation. ...

7 days ago | 0

Vector in a Matrix 2x2, calculate the length of the vector
If I understand your question correctly I think what you want is the vecnorm function.

7 days ago | 0

bisection method, iteration does not stop although hand calculation were diffrent
Let's look at your function. syms x f = sqrt(19.62*x); fun = f*tanh(2.5*f/8); fplot(fun) yline(0) It looks like you have a...

7 days ago | 0

How to do math using datetime objects including years
date_obs = '22:179:18:42:44.610'; j2000date = '2000:001:12:00:00.000'; These don't look like durations, they look like datetim...

7 days ago | 0

how can we make one axes as children of other axes??
No, axes may not be children of other axes. I'm not sure I understand what your ultimate goal is. If you give more details abou...

7 days ago | 0

Convert 8x3 char to string sequence (MATLAB)
val = ... ['011' '010' '001' '000' '000' '001' '010' '011']; s = join(string(val), '')

8 days ago | 0

How to programmatically get the current/local time zone?
Do you want to create a datetime in the current time zone or do you want to know the current time zone? Those are two different ...

9 days ago | 0

| accepted

ODE45 requires more parameters than it should
That syntax, where you pass additional input arguments after the options structure, is an older syntax that is no longer documen...

10 days ago | 0

For loop increment value
See the "Decrement Values" example on the documentation page for the for keyword. Though in the case you described, you don't ne...

10 days ago | 0