I do not do free private consulting. If you want to bring my attention to something, send a link to the MATLAB Answers location.

All

RANK**1**

REPUTATION**112.373**

CONTRIBUTIONS

**32** Questions

**51.349** Answers

ANSWER ACCEPTANCE **
53.13%
**

VOTES RECEIVED**14.354**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**0** Highlights

AVERAGE NO. OF LIKES

Answered

Getting updates from fsolve

https://www.mathworks.com/help/optim/ug/fsolve.html#buta__s-options set the Display option to iter

Getting updates from fsolve

https://www.mathworks.com/help/optim/ug/fsolve.html#buta__s-options set the Display option to iter

alrededor de 5 horas ago | 1

| accepted

Answered

Matlab and 'sandbox' process Peak CPU Usage in macOS Big Sur

This is a known issue in Big Sur 11.4 for M1. I notice that you are not using M1; it is plausible that the same underlying prob...

Matlab and 'sandbox' process Peak CPU Usage in macOS Big Sur

This is a known issue in Big Sur 11.4 for M1. I notice that you are not using M1; it is plausible that the same underlying prob...

alrededor de 6 horas ago | 0

Answered

Multivariate nonlinear equation generation

No, it is not possible in the form stated. Given any finite number of points expressed in finite precision, then there are an u...

Multivariate nonlinear equation generation

No, it is not possible in the form stated. Given any finite number of points expressed in finite precision, then there are an u...

alrededor de 6 horas ago | 0

Answered

could anyone help me to solve the issue in the following command

B = arrayfun(@(N) randi(2,1,N), repelem((1:3).',5), 'uniform', 0)

could anyone help me to solve the issue in the following command

B = arrayfun(@(N) randi(2,1,N), repelem((1:3).',5), 'uniform', 0)

alrededor de 6 horas ago | 0

Answered

Finding closed form value of a variable

That is the closed form. You could approximate it using double() or vpa()

Finding closed form value of a variable

That is the closed form. You could approximate it using double() or vpa()

alrededor de 7 horas ago | 0

Answered

How to set the boundary value of the integral function as a variable

format long g f = @(x)sqrt(3600-x^2)-10 t = (-70:70).'; syms x T F = int(f(x), x, T-10, T+10) val = [t, double(subs(F, T, t...

How to set the boundary value of the integral function as a variable

format long g f = @(x)sqrt(3600-x^2)-10 t = (-70:70).'; syms x T F = int(f(x), x, T-10, T+10) val = [t, double(subs(F, T, t...

alrededor de 14 horas ago | 0

| accepted

Answered

How to solve 3 simultaneous algebraic equations with a equality constraint.

You cannot usefully plot x1 vs t. Your system defines three specific sets of points, two of which are complex-valued syms x1 x2...

How to solve 3 simultaneous algebraic equations with a equality constraint.

You cannot usefully plot x1 vs t. Your system defines three specific sets of points, two of which are complex-valued syms x1 x2...

alrededor de 14 horas ago | 0

| accepted

Answered

How to get the coordinate of cropped rectangular image?

I have manually cropped the area in image 1 Then I predict that the issue is that you do not know what coordinates you manually...

How to get the coordinate of cropped rectangular image?

I have manually cropped the area in image 1 Then I predict that the issue is that you do not know what coordinates you manually...

alrededor de 14 horas ago | 0

Answered

could to create the categorical values for 2x2 cell array

B = cellfun(@convert_to_categorical, A, 'uniform', 0); function C = convert_to_categorical(M) if iscell(M) C = cel...

could to create the categorical values for 2x2 cell array

B = cellfun(@convert_to_categorical, A, 'uniform', 0); function C = convert_to_categorical(M) if iscell(M) C = cel...

alrededor de 15 horas ago | 0

Answered

how do I add MATLAB prompt to command window?

You will not get the >> prompt if MATLAB is busy, or if MATLAB is waiting for you to finish a statement (such as if you are in t...

how do I add MATLAB prompt to command window?

You will not get the >> prompt if MATLAB is busy, or if MATLAB is waiting for you to finish a statement (such as if you are in t...

alrededor de 15 horas ago | 0

Answered

Why the energy value is constant?

x cancels out. radius involves x^(1/5) Your energy calculation has radius*radius*thickness*radius*radius. thickness = radius...

Why the energy value is constant?

x cancels out. radius involves x^(1/5) Your energy calculation has radius*radius*thickness*radius*radius. thickness = radius...

alrededor de 15 horas ago | 0

Answered

how to simplify the command line that generates cell array

No, there is no simplified way to write it. You can automate it in some ways, but the automated versions are more complex. C = ...

how to simplify the command line that generates cell array

No, there is no simplified way to write it. You can automate it in some ways, but the automated versions are more complex. C = ...

alrededor de 15 horas ago | 0

| accepted

Answered

Change MaxFunctionEvaluations in optimization problem

options = optimoptions(prob,'Algorithm','interior-point','MaxFunEvals',10000); [sol,fval,exitflag,output] = solve(prob, x0, 'Op...

Change MaxFunctionEvaluations in optimization problem

options = optimoptions(prob,'Algorithm','interior-point','MaxFunEvals',10000); [sol,fval,exitflag,output] = solve(prob, x0, 'Op...

alrededor de 15 horas ago | 0

Answered

how to convert cell to double inside cell array

mask = cellfun(@iscell, A); A(mask) = cellfun(@cell2mat, A(mask), 'uniform', 0);

how to convert cell to double inside cell array

mask = cellfun(@iscell, A); A(mask) = cellfun(@cell2mat, A(mask), 'uniform', 0);

alrededor de 15 horas ago | 0

Answered

Why is fitglm throwing subscripting error with hospital dataset?

That problem does not occur for me if I test in R2020b (your version) or R2021a When I look at the code, I can see that the pro...

Why is fitglm throwing subscripting error with hospital dataset?

That problem does not occur for me if I test in R2020b (your version) or R2021a When I look at the code, I can see that the pro...

alrededor de 16 horas ago | 0

| accepted

Answered

looping for a function

This has nothing to do with a missing function. Your code in drought.m is defined to expect at least four output variables -- ...

looping for a function

This has nothing to do with a missing function. Your code in drought.m is defined to expect at least four output variables -- ...

alrededor de 16 horas ago | 0

Answered

Sending values using slider in MATLAB GUI to Arduino using serial communication

fwrite(handles.ser1,valor,'double'); That transmits the binary value of valor as an IEEE 754 double precision integer. 64 bits ...

Sending values using slider in MATLAB GUI to Arduino using serial communication

fwrite(handles.ser1,valor,'double'); That transmits the binary value of valor as an IEEE 754 double precision integer. 64 bits ...

alrededor de 17 horas ago | 0

| accepted

Answered

'm quite frustrated about where I went wrong can you please lend some help. I promise I tried

Your g is the value that is expected to be in F. Do not use poly(g) to create F: that creates a polynomial whose roots would be ...

'm quite frustrated about where I went wrong can you please lend some help. I promise I tried

Your g is the value that is expected to be in F. Do not use poly(g) to create F: that creates a polynomial whose roots would be ...

alrededor de 17 horas ago | 0

Answered

Sending values using slider in MATLAB GUI to Arduino using serial communication

That code is okay in itself. You do not need the guidata() call as you are not changing any fields of the structure handles, bu...

Sending values using slider in MATLAB GUI to Arduino using serial communication

That code is okay in itself. You do not need the guidata() call as you are not changing any fields of the structure handles, bu...

alrededor de 17 horas ago | 0

Answered

how can i fix subscript indices must be either real positive integers or logicals

At a location approximately half way through the third line, you have (x(60^3*(x(1) - x(2)))/6 You might possibly have intende...

how can i fix subscript indices must be either real positive integers or logicals

At a location approximately half way through the third line, you have (x(60^3*(x(1) - x(2)))/6 You might possibly have intende...

alrededor de 17 horas ago | 0

| accepted

Answered

How to extract the features of each cluster in the k means clustering?

No. There are an uncountable infinity of possible "features" for any given set of points, even if the set of points is a finite ...

How to extract the features of each cluster in the k means clustering?

No. There are an uncountable infinity of possible "features" for any given set of points, even if the set of points is a finite ...

alrededor de 18 horas ago | 0

Answered

how to save values for changing number of columns using "for loop "

We do not know the size of U. Call it N x M U(:,1:r) is an N x r matrix U(:,1:r)' is an r x N matrix. X we do not know the si...

how to save values for changing number of columns using "for loop "

We do not know the size of U. Call it N x M U(:,1:r) is an N x r matrix U(:,1:r)' is an r x N matrix. X we do not know the si...

alrededor de 18 horas ago | 1

Answered

Dot indexing is not supported for variables of this type.

cell_array_of_folder_names2 = setdiff({sad22([sad22.isdir]).name},{'..','.'}); % Select folder names Those are file names Fil...

Dot indexing is not supported for variables of this type.

cell_array_of_folder_names2 = setdiff({sad22([sad22.isdir]).name},{'..','.'}); % Select folder names Those are file names Fil...

alrededor de 24 horas ago | 0

Answered

Problem with patch function

It is not clear what result you would expect when the data overlaps and one of them has a "twist" ? load('XZ.mat') fill(X(1,:)...

Problem with patch function

It is not clear what result you would expect when the data overlaps and one of them has a "twist" ? load('XZ.mat') fill(X(1,:)...

1 día ago | 0

Answered

datetime unable to parse format 'mmm dd, yyyy'

datestr() uses 'm' to indicate months, but datetime() uses 'm' to indicate minutes. You cannot use the same format string for bo...

datetime unable to parse format 'mmm dd, yyyy'

datestr() uses 'm' to indicate months, but datetime() uses 'm' to indicate minutes. You cannot use the same format string for bo...

1 día ago | 0

Answered

how to plot different cell arrays in just one graphic?

temp = [reshape(First, 1, []); reshape(Second, 1,[])]; plot(temp{:})

how to plot different cell arrays in just one graphic?

temp = [reshape(First, 1, []); reshape(Second, 1,[])]; plot(temp{:})

1 día ago | 0

Answered

Why do i receive "Error using plot. Data cannot have more than 2 dimensions"

You have variables with three indices. plot() is a tool for 2d line plots,and cannot handle 3d arrays. When you have 3d arra...

Why do i receive "Error using plot. Data cannot have more than 2 dimensions"

You have variables with three indices. plot() is a tool for 2d line plots,and cannot handle 3d arrays. When you have 3d arra...

1 día ago | 0

Answered

How to implement the math equation correctly to make a plot ?

%rectangular aperture array factor. N = 150; I_0 = 1; lambda =1.55e-6; k=(2*pi)/lambda; period = 2e-6; theta = linsp...

How to implement the math equation correctly to make a plot ?

%rectangular aperture array factor. N = 150; I_0 = 1; lambda =1.55e-6; k=(2*pi)/lambda; period = 2e-6; theta = linsp...

1 día ago | 1

| accepted

Answered

Can't get data from input string

if ~isfield(data, 'name') error('dataset "%s" is not loaded', name) end pos = data.(name);

Can't get data from input string

if ~isfield(data, 'name') error('dataset "%s" is not loaded', name) end pos = data.(name);

1 día ago | 0

Answered

Change corners from image

img = imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/661015/image.png'); imshow(img); title('original ...

Change corners from image

img = imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/661015/image.png'); imshow(img); title('original ...

1 día ago | 0

| accepted