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

I get an error when I run a function on mac, but it works when run in Windows

Make sure you haven't written or downloaded your own var.m that's taking precedence over the var.m included in MATLAB. You can c...

I get an error when I run a function on mac, but it works when run in Windows

Make sure you haven't written or downloaded your own var.m that's taking precedence over the var.m included in MATLAB. You can c...

11 hours ago | 0

| accepted

Answered

How do I calculate percentage or frequency and display it on a bar plot?

Use histogram with 'probability' as the value for the 'Normalization' option.

How do I calculate percentage or frequency and display it on a bar plot?

Use histogram with 'probability' as the value for the 'Normalization' option.

16 hours ago | 0

Answered

Linux (CentOS 7,5) Deployable Installation

Do you have the necessary permission to write to /usr/local/MATLAB/MATLAB_Runtime? Does /usr/local/MATLAB/MATLAB_Runtime/v92 al...

Linux (CentOS 7,5) Deployable Installation

Do you have the necessary permission to write to /usr/local/MATLAB/MATLAB_Runtime? Does /usr/local/MATLAB/MATLAB_Runtime/v92 al...

1 day ago | 0

Answered

How could I fix the error "Out of memory with ode45" ?

My suspicion is that you're calling ode45 with a function handle as input from inside the function that you're passing into ode4...

How could I fix the error "Out of memory with ode45" ?

My suspicion is that you're calling ode45 with a function handle as input from inside the function that you're passing into ode4...

2 days ago | 0

Answered

"normalize" Does Not Work on R2020a

In my installation of release R2020a line 23 of the normalize.m included in MATLAB is a comment that's about a third of the way ...

"normalize" Does Not Work on R2020a

In my installation of release R2020a line 23 of the normalize.m included in MATLAB is a comment that's about a third of the way ...

2 days ago | 0

| accepted

Answered

Extract data using histogram2()

If you want the data that was passed into histogram2 retrieve the Data property of the histogram. If you want the edges of the ...

Extract data using histogram2()

If you want the data that was passed into histogram2 retrieve the Data property of the histogram. If you want the edges of the ...

2 days ago | 0

Answered

if else statement for tabular data classification

discretize your data. Let's start off with some sample data. I'm using rng default so you receive the same results I did when I ...

if else statement for tabular data classification

discretize your data. Let's start off with some sample data. I'm using rng default so you receive the same results I did when I ...

2 days ago | 0

Answered

How to calculate mean of all the rows individually and should be stored in the same worksheet ?

Use varfun to apply the function @(x) mean(x, 'omitnan') to each variable in the table.

How to calculate mean of all the rows individually and should be stored in the same worksheet ?

Use varfun to apply the function @(x) mean(x, 'omitnan') to each variable in the table.

2 days ago | 0

Answered

Matlab Grader Assessment Feedback

I haven't tried this, but something like this should work: % Innocent until proven guilty. pass = 1; feedback = ""; % Run le...

Matlab Grader Assessment Feedback

I haven't tried this, but something like this should work: % Innocent until proven guilty. pass = 1; feedback = ""; % Run le...

3 days ago | 0

| accepted

Answered

display result (numbers)

When you take the max of an integer array, the result is of the same integer type. When you take the mean of an integer array, ...

display result (numbers)

When you take the max of an integer array, the result is of the same integer type. When you take the mean of an integer array, ...

3 days ago | 0

| accepted

Answered

how can hellp me??

Please send the code you're running when you can reproduce that behavior to Technical Support using the telephone icon in the up...

how can hellp me??

Please send the code you're running when you can reproduce that behavior to Technical Support using the telephone icon in the up...

3 days ago | 0

Answered

How to read and write multiple .txt files with unpatterned names into a table?

Generate a list of the files you want to import. There are a number of different tools you can use to do this; since you say the...

How to read and write multiple .txt files with unpatterned names into a table?

Generate a list of the files you want to import. There are a number of different tools you can use to do this; since you say the...

3 days ago | 0

Answered

Solving linear system using Sherman-Morrison formula for 1000000x1000000 (7450.6GB) matrix

Unless you have a machine with multiple terabytes of memory, you can't solve this directly. Instead, use one of the iterative s...

Solving linear system using Sherman-Morrison formula for 1000000x1000000 (7450.6GB) matrix

Unless you have a machine with multiple terabytes of memory, you can't solve this directly. Instead, use one of the iterative s...

3 days ago | 0

Answered

Why doesn't the loop in my for loop work?

for f = 1:Besparingslistan(:,1) This doesn't do what you think it does. Consider: A = [20 1 2; 2 3 4; 3 4 5; 4 5 6]; for f = ...

Why doesn't the loop in my for loop work?

for f = 1:Besparingslistan(:,1) This doesn't do what you think it does. Consider: A = [20 1 2; 2 3 4; 3 4 5; 4 5 6]; for f = ...

3 days ago | 0

Answered

output argument not assigned during call

Where in your MYFunction function do you assign any value to the variable J?

output argument not assigned during call

Where in your MYFunction function do you assign any value to the variable J?

4 days ago | 0

Answered

Ignore anomalies in collection of datasets

Preprocess your data to identify, fill, and/or remove outliers. Use the functions in the "Missing Data and Outliers" section on ...

Ignore anomalies in collection of datasets

Preprocess your data to identify, fill, and/or remove outliers. Use the functions in the "Missing Data and Outliers" section on ...

4 days ago | 0

Answered

All available default settings for groot?

Those "properties" aren't properties of groot. See this documentation page for a description of that syntax for setting default ...

All available default settings for groot?

Those "properties" aren't properties of groot. See this documentation page for a description of that syntax for setting default ...

4 days ago | 0

Answered

How to find min and max of a matrix?

Use sortrows. Specify that you want to sort the first column in ascending order and the second in descending order.

How to find min and max of a matrix?

Use sortrows. Specify that you want to sort the first column in ascending order and the second in descending order.

4 days ago | 0

| accepted

Answered

How can I convert a table into separate columns?

If you want to turn this into a |timetable| use |table2timetable| instead of |table2array| and |array2timetable| like I think yo...

How can I convert a table into separate columns?

If you want to turn this into a |timetable| use |table2timetable| instead of |table2array| and |array2timetable| like I think yo...

5 days ago | 0

Answered

edges to vertices distance

If you've built a graph or digraph object, call distances to get the distances between each pairs of nodes or shortestpath if yo...

edges to vertices distance

If you've built a graph or digraph object, call distances to get the distances between each pairs of nodes or shortestpath if yo...

5 days ago | 0

Answered

how can i stay 7t longer in my code

If your equations depend not just on the value of the solution at the current time but also the value of the solution at a previ...

how can i stay 7t longer in my code

If your equations depend not just on the value of the solution at the current time but also the value of the solution at a previ...

6 days ago | 0

Answered

C-Caller block missing in MATLAB 2018a

According to the documentation page for that block it was "Introduced in R2018b" and so is not available in earlier releases. In...

C-Caller block missing in MATLAB 2018a

According to the documentation page for that block it was "Introduced in R2018b" and so is not available in earlier releases. In...

6 days ago | 0

Answered

Unsatisfied answer and no errors

sum b(i,j,k)=1 sum b(i,j,k)=0 These lines don't do what you think they do. They are equivalent to: sum('b(i,j,k)=1') sum('b(...

Unsatisfied answer and no errors

sum b(i,j,k)=1 sum b(i,j,k)=0 These lines don't do what you think they do. They are equivalent to: sum('b(i,j,k)=1') sum('b(...

7 days ago | 0

| accepted

Answered

1.If ode45 uses adaptive time step, how can we control that in your code. 2.You have specified deltaT in code. Does the solver use that interval to decide the time interval for integration?3.4. If not, then what is the utility of deltaT in code

If ode45 uses adaptive time step, how can we control that in your code. You don't, at least not directly. You let ode45 take th...

1.If ode45 uses adaptive time step, how can we control that in your code. 2.You have specified deltaT in code. Does the solver use that interval to decide the time interval for integration?3.4. If not, then what is the utility of deltaT in code

If ode45 uses adaptive time step, how can we control that in your code. You don't, at least not directly. You let ode45 take th...

7 days ago | 0

Answered

Save function doesn't do anything

Let's make sure you're calling the correct version of the save function. What does this command show? which -all save

Save function doesn't do anything

Let's make sure you're calling the correct version of the save function. What does this command show? which -all save

7 days ago | 0

Answered

what should I do. HELP function

As stated on this documentation page "Script files cannot have the same name as a function in the file." Either rename your scri...

what should I do. HELP function

As stated on this documentation page "Script files cannot have the same name as a function in the file." Either rename your scri...

7 days ago | 0

Answered

Is it possible to edit a legend with 19 labels down to only 6 labels which correspond to a colour?

You can pass a vector of specific handles that you want to appear in the legend into the legend function. % Sample data x = 0:...

Is it possible to edit a legend with 19 labels down to only 6 labels which correspond to a colour?

You can pass a vector of specific handles that you want to appear in the legend into the legend function. % Sample data x = 0:...

7 days ago | 0

Answered

Exportgraphics and TiledLayout: Figure Handle vs TiledLayout handle?

From the documentation page for the exportgraphics function the relevant detail to me is "The graphics object can be any type of...

Exportgraphics and TiledLayout: Figure Handle vs TiledLayout handle?

From the documentation page for the exportgraphics function the relevant detail to me is "The graphics object can be any type of...

8 days ago | 0

| accepted

Answered

editing the JET colormap

You should probably read through this documentation page and the pages listed in the "Related Topics" section on that page. It t...

editing the JET colormap

You should probably read through this documentation page and the pages listed in the "Related Topics" section on that page. It t...

8 days ago | 1

Answered

n th Fibonacci number with function

function [c] = fibo (a, b, n) n = input('n:'); Every time your user calls your fibo function, you're going to ask them to pass...

n th Fibonacci number with function

function [c] = fibo (a, b, n) n = input('n:'); Every time your user calls your fibo function, you're going to ask them to pass...

8 days ago | 0

| accepted