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.

Answered

How would I perform logical comparisons with times given in the form of a string vector?

% time = datenum(temptime); Instead of converting the dates and times to serial date numbers, I recommend converting them to a ...

How would I perform logical comparisons with times given in the form of a string vector?

% time = datenum(temptime); Instead of converting the dates and times to serial date numbers, I recommend converting them to a ...

1 day ago | 0

Answered

actxcontrol and actxserver: Future support plans?

1. Is there an announced time-frame for removing the actxcontrol( ) command? If you're looking for something more concrete than...

actxcontrol and actxserver: Future support plans?

1. Is there an announced time-frame for removing the actxcontrol( ) command? If you're looking for something more concrete than...

2 days ago | 1

Answered

Error being printed "Error using sym>convertChar (line 1557) Character vectors and strings in the first argument can only specify a variable or number. To evaluate character vectors and strings representing symbolic expressions, use 'str2sym'."

You could use str2sym as the error message suggested, but instead I would use one of the approaches shown on this documentation ...

Error being printed "Error using sym>convertChar (line 1557) Character vectors and strings in the first argument can only specify a variable or number. To evaluate character vectors and strings representing symbolic expressions, use 'str2sym'."

You could use str2sym as the error message suggested, but instead I would use one of the approaches shown on this documentation ...

2 days ago | 0

Answered

Split Table data based on Day Names

Do you want to have seven individual variables or do you want to operate on the set of rows in your table data where each row in...

Split Table data based on Day Names

Do you want to have seven individual variables or do you want to operate on the set of rows in your table data where each row in...

2 days ago | 0

Answered

How can I fix the problem of deep network designer in MATLAB?

Which release of Deep Learning Toolbox are you using? If you're using a release prior to R2019a I suspect though I'm not certain...

How can I fix the problem of deep network designer in MATLAB?

Which release of Deep Learning Toolbox are you using? If you're using a release prior to R2019a I suspect though I'm not certain...

2 days ago | 0

Answered

Passing structs/objects to functions

Just because MATLAB passes a large array into a function doesn't mean it needs to make a copy of that array if you don't modify ...

Passing structs/objects to functions

Just because MATLAB passes a large array into a function doesn't mean it needs to make a copy of that array if you don't modify ...

2 days ago | 0

Answered

Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.

for 1=1:n, The number 1 is not a valid variable name in MATLAB and so cannot be used as the loop variable in a for loop.

Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.

for 1=1:n, The number 1 is not a valid variable name in MATLAB and so cannot be used as the loop variable in a for loop.

2 days ago | 0

Answered

How to open Matlab with specific scripts in my editor?

Consider setting up different Projects for your different projects.

How to open Matlab with specific scripts in my editor?

Consider setting up different Projects for your different projects.

3 days ago | 0

Answered

How to replace specific values to all values of a bin ?

Specify the values input argument in your discretize call. x = 6*rand(10, 1); d = discretize(x, 0:2:6, [1.6, 3.8, 5.7]); resu...

How to replace specific values to all values of a bin ?

Specify the values input argument in your discretize call. x = 6*rand(10, 1); d = discretize(x, 0:2:6, [1.6, 3.8, 5.7]); resu...

3 days ago | 3

Answered

Nested structs and objects - do or don't?

Off the top of my head I'd probably use a three tier approach, something along the lines of the following untested code: classd...

Nested structs and objects - do or don't?

Off the top of my head I'd probably use a three tier approach, something along the lines of the following untested code: classd...

3 days ago | 0

Answered

resampling to avoid limit - nchoosek

Assuming VID1 has 429 elements and Hcombos has 36 rows, that means you're trying to generate one of this many combinations: N =...

resampling to avoid limit - nchoosek

Assuming VID1 has 429 elements and Hcombos has 36 rows, that means you're trying to generate one of this many combinations: N =...

4 days ago | 0

| accepted

Answered

how to define a variable with dates

Adapt the example on this documentation page. It won't require a lot of modification.

how to define a variable with dates

Adapt the example on this documentation page. It won't require a lot of modification.

4 days ago | 0

| accepted

Answered

Feature Matching in MATLAB

Break each of those steps into sub-steps. Repeat step 1 until you've broken each step into sub-steps that you are able to imple...

Feature Matching in MATLAB

Break each of those steps into sub-steps. Repeat step 1 until you've broken each step into sub-steps that you are able to imple...

5 days ago | 0

| accepted

Answered

Hi, I want to write a code that locates the nth value of matrix x= [2,4,6,8,10,12,14,16,18,20] where n is [1:10]. How could I write that?

That's basic linear indexing. See the "Indexing with a Single Index" section on this documentation page for more information. x...

Hi, I want to write a code that locates the nth value of matrix x= [2,4,6,8,10,12,14,16,18,20] where n is [1:10]. How could I write that?

That's basic linear indexing. See the "Indexing with a Single Index" section on this documentation page for more information. x...

5 days ago | 0

Answered

Inconsistency of angle function in finding angle of vectors

Typing the command angle(1+i) yields an angle of 45 degrees, No it doesn't. It returns the equivalent angle in radians, however...

Inconsistency of angle function in finding angle of vectors

Typing the command angle(1+i) yields an angle of 45 degrees, No it doesn't. It returns the equivalent angle in radians, however...

6 days ago | 0

Answered

Comparative Operator result is wrong

Two numbers that are displayed the same may not represent the same stored value. See this Answers post for more information abou...

Comparative Operator result is wrong

Two numbers that are displayed the same may not represent the same stored value. See this Answers post for more information abou...

6 days ago | 0

Answered

How to clear a TestCase class from memory?

You may find this new feature introduced in release R2021a useful.

How to clear a TestCase class from memory?

You may find this new feature introduced in release R2021a useful.

9 days ago | 1

Answered

How to get mean of all variables in a table?

The varfun function requires one of its inputs to be a table or timetable array (or a tall table or timetable.) which -all varf...

How to get mean of all variables in a table?

The varfun function requires one of its inputs to be a table or timetable array (or a tall table or timetable.) which -all varf...

9 days ago | 1

| accepted

Answered

Graphplot nodes How to ensure generating only existing nodes.

S=[1 30]; T=[2, 1]; D1 = digraph(S, T) % use S and T as node numbers, 30 nodes plot(D1) D2 = digraph(string(S), string(T))...

Graphplot nodes How to ensure generating only existing nodes.

S=[1 30]; T=[2, 1]; D1 = digraph(S, T) % use S and T as node numbers, 30 nodes plot(D1) D2 = digraph(string(S), string(T))...

9 days ago | 0

| accepted

Answered

Error using inlineeval (line 14)

Do not use inline. We first marked it "not recommended" somewhere between 15 and 20 years ago if I recall correctly. Just opera...

Error using inlineeval (line 14)

Do not use inline. We first marked it "not recommended" somewhere between 15 and 20 years ago if I recall correctly. Just opera...

10 days ago | 1

| accepted

Answered

"Array indicies must be positive integers" error

The first element / row / column / etc. of an array in MATLAB is element / row / column / etc. 1. There is no element / row / c...

"Array indicies must be positive integers" error

The first element / row / column / etc. of an array in MATLAB is element / row / column / etc. 1. There is no element / row / c...

10 days ago | 0

Answered

Why I can't use keywords "AutoFitWidth" for writematrix() in MATLAB R2020a?

That functionality was added in release R2020b.

Why I can't use keywords "AutoFitWidth" for writematrix() in MATLAB R2020a?

That functionality was added in release R2020b.

10 days ago | 0

Answered

How can I fix this error?

Where in your code do you define a variable named i? If the answer is some form of "nowhere" or "I don't" then MATLAB will call ...

How can I fix this error?

Where in your code do you define a variable named i? If the answer is some form of "nowhere" or "I don't" then MATLAB will call ...

11 days ago | 0

Answered

Modifying variables in properties(TestParameter) of the unittest class

You can define a class-related function at the end of the file, after the end that matches the classdef keyword, that returns th...

Modifying variables in properties(TestParameter) of the unittest class

You can define a class-related function at the end of the file, after the end that matches the classdef keyword, that returns th...

11 days ago | 0

Answered

Object oriented programming - Constructor behavior

Because class constructors are special. MATLAB knows exactly which method in a class is the class constructor (it has to have th...

Object oriented programming - Constructor behavior

Because class constructors are special. MATLAB knows exactly which method in a class is the class constructor (it has to have th...

11 days ago | 0

| accepted

Answered

Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.

function plottransect(1) As stated on this documentation page "If your function accepts any inputs, enclose their names in pare...

Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.

function plottransect(1) As stated on this documentation page "If your function accepts any inputs, enclose their names in pare...

11 days ago | 0

Answered

random number generator rng performs differently on compiled binaries (in Linux)

In your application, does the user call your function with the seed value that you pass into rng? x1 = myfun(42) x2 = myfun(99...

random number generator rng performs differently on compiled binaries (in Linux)

In your application, does the user call your function with the seed value that you pass into rng? x1 = myfun(42) x2 = myfun(99...

11 days ago | 0

Answered

Need assistance in fitting tool

"2pi" is not a valid way to write 2 in MATLAB. y = 2*pi

Need assistance in fitting tool

"2pi" is not a valid way to write 2 in MATLAB. y = 2*pi

11 days ago | 0

Answered

Betweenness Centrality for a vertices in an adjacency matrix

Since this question was asked we have added the graph and digraph objects to MATLAB. Use one of those functions to create an obj...

Betweenness Centrality for a vertices in an adjacency matrix

Since this question was asked we have added the graph and digraph objects to MATLAB. Use one of those functions to create an obj...

12 days ago | 0

Answered

How to quote variables whose names are in order in a for loop?

See if some of the tools in MATLAB for working with data that is too large to fit in memory on one machine all at once will sati...

How to quote variables whose names are in order in a for loop?

See if some of the tools in MATLAB for working with data that is too large to fit in memory on one machine all at once will sati...

12 days ago | 0