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

Variable not being saved/stored from function

function [ZWF,XWF,ZRF,XRF] = walk_run(n) Your function declaration does not list XWI as a variable that it returns to its calle...

Variable not being saved/stored from function

function [ZWF,XWF,ZRF,XRF] = walk_run(n) Your function declaration does not list XWI as a variable that it returns to its calle...

ongeveer 8 uur ago | 0

Answered

Why does pcolor not display the full matrix?

This is not a bug. The perceived bug is the result of the 2-dimensional fencepost error. From the description of the C input arg...

Why does pcolor not display the full matrix?

This is not a bug. The perceived bug is the result of the 2-dimensional fencepost error. From the description of the C input arg...

ongeveer 8 uur ago | 0

Answered

How to show every iteration step of lsqnonlin()?

You probably want to specify a PlotFcn as part of the options that get passed into lsqnonlin. See this documentation page for mo...

How to show every iteration step of lsqnonlin()?

You probably want to specify a PlotFcn as part of the options that get passed into lsqnonlin. See this documentation page for mo...

ongeveer 12 uur ago | 0

Answered

matlab error ode45

If you call your rolling function with the first element of tspan and the initial condition vector x0 as inputs, do you receive ...

matlab error ode45

If you call your rolling function with the first element of tspan and the initial condition vector x0 as inputs, do you receive ...

1 dag ago | 0

Answered

Linspace giving me undefined function 'uminus'

Here's what appears to be the relevant section of code. b = app.RadiusStalk; E = app.ElasticModulus; ...

Linspace giving me undefined function 'uminus'

Here's what appears to be the relevant section of code. b = app.RadiusStalk; E = app.ElasticModulus; ...

1 dag ago | 0

| accepted

Answered

Cannot get the function to draw function

% t1 = 0: 1/10000 : 5; % funkce1 = exp(-3*t)-2; Is funkce1 supposed to use t or t1? I could see it using the symbolic variable...

Cannot get the function to draw function

% t1 = 0: 1/10000 : 5; % funkce1 = exp(-3*t)-2; Is funkce1 supposed to use t or t1? I could see it using the symbolic variable...

1 dag ago | 0

Answered

Changing version of Python in MATLAB

See the "Set Python Version on Mac and Linux Platforms" section on this documentation page.

Changing version of Python in MATLAB

See the "Set Python Version on Mac and Linux Platforms" section on this documentation page.

1 dag ago | 0

Answered

Syms function no longer works in a for loop which stores data

If you try to do something like the following: %{ syms x F = 0; F(2) = x; %} What numeric value should be stored in F(2) a...

Syms function no longer works in a for loop which stores data

If you try to do something like the following: %{ syms x F = 0; F(2) = x; %} What numeric value should be stored in F(2) a...

1 dag ago | 0

Answered

Getting Error message when using backslash operator

You've posted the dydtsys_practice function that implements the right-hand side of your system of ODEs, but to solve the system ...

Getting Error message when using backslash operator

You've posted the dydtsys_practice function that implements the right-hand side of your system of ODEs, but to solve the system ...

2 dagen ago | 0

| accepted

Answered

How to find the index of a randomly chosen element of an array

Start off generating the index and use it to extract the element. a = [4 8 15 16 23 42]; I = randi(numel(a)); fprintf("Elemen...

How to find the index of a randomly chosen element of an array

Start off generating the index and use it to extract the element. a = [4 8 15 16 23 42]; I = randi(numel(a)); fprintf("Elemen...

2 dagen ago | 2

Answered

Timestamp to Decimal day of year

dt = datetime('now', 'TimeZone', 'EST') startOfYear = dateshift(dt, 'start', 'year') fractionOfYear = years(dt - startOfYear) ...

Timestamp to Decimal day of year

dt = datetime('now', 'TimeZone', 'EST') startOfYear = dateshift(dt, 'start', 'year') fractionOfYear = years(dt - startOfYear) ...

3 dagen ago | 0

Answered

Imagine a dice tetra-brick (four faces: 1, 2, 3, 4) with the following probabilities [0.5, 0.2, 0.2, 0.1] . Let Y be the Random Variable that simulate the output of rolling the dice.

Use histcounts or histogram. Alternately if this is part of a homework assignment and you're instructed not to use those functi...

Imagine a dice tetra-brick (four faces: 1, 2, 3, 4) with the following probabilities [0.5, 0.2, 0.2, 0.1] . Let Y be the Random Variable that simulate the output of rolling the dice.

Use histcounts or histogram. Alternately if this is part of a homework assignment and you're instructed not to use those functi...

4 dagen ago | 0

Answered

How can I define the variable handles for this code. A is a numerical value not text "Undefined variable handles or class "handles.A"

Generally speaking, usually code that involves a struct array named handles is part of a GUI created using GUIDE. If you're tryi...

How can I define the variable handles for this code. A is a numerical value not text "Undefined variable handles or class "handles.A"

Generally speaking, usually code that involves a struct array named handles is part of a GUI created using GUIDE. If you're tryi...

4 dagen ago | 0

Answered

Simple, but stumped. Using 'xline' to create animated "play marker" across waveform plot.

Rather than deleting and recreating the line, change its properties. % Define the data x = 0:360; y = sind(x); % Create th...

Simple, but stumped. Using 'xline' to create animated "play marker" across waveform plot.

Rather than deleting and recreating the line, change its properties. % Define the data x = 0:360; y = sind(x); % Create th...

4 dagen ago | 1

Answered

The fix(x) command does not work

Just because a number is displayed as 1 in the default display format does not mean that the stored value is exactly 1. It's clo...

The fix(x) command does not work

Just because a number is displayed as 1 in the default display format does not mean that the stored value is exactly 1. It's clo...

4 dagen ago | 0

Answered

How to replace all newline characters in a string with a space?

Since this sounds like it may be a homework assignment, I'll only give a hint. There's one function in the "Create, Concatenate,...

How to replace all newline characters in a string with a space?

Since this sounds like it may be a homework assignment, I'll only give a hint. There's one function in the "Create, Concatenate,...

4 dagen ago | 0

Answered

Checking if a value is equal to zero or no ? with the problem of floating-point numbers !

Testing for exact, down-to-the-last-bit equality with == can be problematic. Instead, the general recommendation is to check for...

Checking if a value is equal to zero or no ? with the problem of floating-point numbers !

Testing for exact, down-to-the-last-bit equality with == can be problematic. Instead, the general recommendation is to check for...

5 dagen ago | 0

Answered

Help With Conditonally variant Anonymous function.

Let's say val is 2. So if Z is between 1 and 500 B2 should be -2, if it is between 501 and 1500 B2 should be 2, and if it is bet...

Help With Conditonally variant Anonymous function.

Let's say val is 2. So if Z is between 1 and 500 B2 should be -2, if it is between 501 and 1500 B2 should be 2, and if it is bet...

5 dagen ago | 0

Answered

How do I call a function which I have defined within a class?

When you call a non-Static method of a class, at least one of the inputs to that method must be an instance of that class. With ...

How do I call a function which I have defined within a class?

When you call a non-Static method of a class, at least one of the inputs to that method must be an instance of that class. With ...

6 dagen ago | 1

Answered

Different results with same code??

m_s = 2000; %(kg) Sprung mass m_u = 200; %(kg) Un-sprung mass k_s = 200000...

Different results with same code??

m_s = 2000; %(kg) Sprung mass m_u = 200; %(kg) Un-sprung mass k_s = 200000...

7 dagen ago | 0

Answered

Creating M histograms from an NxM table on separate plots

A = 2*randn(1e4, 6) + 5*(0:5); T = array2table(A); for k = 1:width(T) subplot(2, 3, k) histogram(T{:, k}) end Note...

Creating M histograms from an NxM table on separate plots

A = 2*randn(1e4, 6) + 5*(0:5); T = array2table(A); for k = 1:width(T) subplot(2, 3, k) histogram(T{:, k}) end Note...

7 dagen ago | 1

| accepted

Answered

Operands on table, comparison with numbers

say I fix one of the row indices " ind" .If I try say find(A(ind,:)>0.1) I get the error : "Operation '>' not supported for oper...

Operands on table, comparison with numbers

say I fix one of the row indices " ind" .If I try say find(A(ind,:)>0.1) I get the error : "Operation '>' not supported for oper...

8 dagen ago | 0

| accepted

Answered

How to extract rows based on column values in a matrix?

This wasn't an option when the question was asked originally but depending what you're trying to do with those "3 matrices", usi...

How to extract rows based on column values in a matrix?

This wasn't an option when the question was asked originally but depending what you're trying to do with those "3 matrices", usi...

8 dagen ago | 0

Answered

Matlab 2020b does not find Xcode Mac OS Big Sur

I would try following the instruction in the warning message. Run Xcode (outside of MATLAB) and when it prompts you to accept th...

Matlab 2020b does not find Xcode Mac OS Big Sur

I would try following the instruction in the warning message. Run Xcode (outside of MATLAB) and when it prompts you to accept th...

8 dagen ago | 0

Answered

Create new column in table based on another column value

Let's start with a sample table. T = table([123; 345; 234], [9; 1; 3], 'VariableNames', ["ID", "Occurrences"]) Fill in the Uni...

Create new column in table based on another column value

Let's start with a sample table. T = table([123; 345; 234], [9; 1; 3], 'VariableNames', ["ID", "Occurrences"]) Fill in the Uni...

8 dagen ago | 0

| accepted

Answered

Sorting time in 1 hour time slots.

minutesPerDay = minutes(days(1)); m = minutes(randi(minutesPerDay, 100, 1)); n = datetime('now'); t = n + m; h = histogram(t...

Sorting time in 1 hour time slots.

minutesPerDay = minutes(days(1)); m = minutes(randi(minutesPerDay, 100, 1)); n = datetime('now'); t = n + m; h = histogram(t...

8 dagen ago | 0

Answered

Generalized Eigenvalue Problem - Hessenberg Matrix

It sounds like you might want to use the syntax of eigs whose first input is Afun, a function handle that returns the result of ...

Generalized Eigenvalue Problem - Hessenberg Matrix

It sounds like you might want to use the syntax of eigs whose first input is Afun, a function handle that returns the result of ...

9 dagen ago | 0

Answered

Error using inputdlg: dialogs disabled

Line 2 of the inputdlg function included in MATLAB is a comment describing the function. Therefore you have written or downloade...

Error using inputdlg: dialogs disabled

Line 2 of the inputdlg function included in MATLAB is a comment describing the function. Therefore you have written or downloade...

9 dagen ago | 0

Answered

Creating a symbolic array

If you want an array of q's: syms q A = repmat(q, [5 5])

Creating a symbolic array

If you want an array of q's: syms q A = repmat(q, [5 5])

9 dagen ago | 0

Answered

Installing matlab 2019 on windows

Searching using Google for "exec error 22" found this MATLAB Answers post that appears to be relevant.

Installing matlab 2019 on windows

Searching using Google for "exec error 22" found this MATLAB Answers post that appears to be relevant.

9 dagen ago | 0