43,055 total contributions since 2011

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

Answered

"Undefined function or variable 'imsplit'."

<https://www.mathworks.com/help/images/ref/imsplit.html> Requires R2018b You should be using the "doc" function in your MA...

"Undefined function or variable 'imsplit'."

<https://www.mathworks.com/help/images/ref/imsplit.html> Requires R2018b You should be using the "doc" function in your MA...

22 hours ago | 0

Answered

MATLAB Active Contour Open Source Code

https://www.mathworks.com/matlabcentral/fileexchange/19567-active-contour-segmentation

MATLAB Active Contour Open Source Code

https://www.mathworks.com/matlabcentral/fileexchange/19567-active-contour-segmentation

24 hours ago | 0

Answered

Is there anyway to load 2011b to Win 10?

Yes. I have done it in the past. It is not supported, and you can expect there could be problems with serial ports, parallel por...

Is there anyway to load 2011b to Win 10?

Yes. I have done it in the past. It is not supported, and you can expect there could be problems with serial ports, parallel por...

24 hours ago | 0

Answered

How do I create a session that is limited by time

I have only found four ways in MATLAB to force a function to end without its cooperation: # Java robot class to send control ...

How do I create a session that is limited by time

I have only found four ways in MATLAB to force a function to end without its cooperation: # Java robot class to send control ...

1 day ago | 1

Answered

In what order the transfer of functions take place in Fmincon?

fmincon is invoked first and controls all the other calls. The initial value will never be used if it does not fit within the...

In what order the transfer of functions take place in Fmincon?

fmincon is invoked first and controls all the other calls. The initial value will never be used if it does not fit within the...

1 day ago | 0

| accepted

Answered

Stop uitable from appending to cell when you type

Use the uitable cell selection callback. When the callback fires, look at the position indicated in the event data, and set that...

Stop uitable from appending to cell when you type

Use the uitable cell selection callback. When the callback fires, look at the position indicated in the event data, and set that...

1 day ago | 0

Answered

Error in imabsdiff of two images

You are trying to take the image difference between file *names*. You need to read in the files and compare the contents.

Error in imabsdiff of two images

You are trying to take the image difference between file *names*. You need to read in the files and compare the contents.

1 day ago | 1

Answered

output of k means clusters "idx"

idx will be a vector which has as many entries as there are rows in X. The j'th entry, idx(j) tells you the cluster number that...

output of k means clusters "idx"

idx will be a vector which has as many entries as there are rows in X. The j'th entry, idx(j) tells you the cluster number that...

1 day ago | 0

Answered

How do I setup ROI once and it will apply to all other images?

imageFolder = dir('C:\Users\85042513\MATLAB\Projects\BAT CVE\Images\OK\*.jpg'); numfiles = length(imageFolder); ori_roi = cell...

How do I setup ROI once and it will apply to all other images?

imageFolder = dir('C:\Users\85042513\MATLAB\Projects\BAT CVE\Images\OK\*.jpg'); numfiles = length(imageFolder); ori_roi = cell...

1 day ago | 0

Answered

Data import from csv file

These days we recommend readtable() -- or if you have R2019a or later and your data is entirely numeric, then possibly readmatri...

Data import from csv file

These days we recommend readtable() -- or if you have R2019a or later and your data is entirely numeric, then possibly readmatri...

2 days ago | 0

Answered

solve a system of equations symbolically with R2018a

You are using R2018b or later. solve() no longer accepts character vectors for equations. Furthermore, each of your equations h...

solve a system of equations symbolically with R2018a

You are using R2018b or later. solve() no longer accepts character vectors for equations. Furthermore, each of your equations h...

2 days ago | 0

Answered

Issue Saving image with text overlay to png

I recommend you take a different approach. Instead of plotting on the image and text() on the image, use the Computer Vision ins...

Issue Saving image with text overlay to png

I recommend you take a different approach. Instead of plotting on the image and text() on the image, use the Computer Vision ins...

2 days ago | 0

Answered

How can I get the index numbers of cells that form a specific string?

This is an algorithm question rather than a MATLAB question, really. Start with an empty cell array of leading substrings, and ...

How can I get the index numbers of cells that form a specific string?

This is an algorithm question rather than a MATLAB question, really. Start with an empty cell array of leading substrings, and ...

2 days ago | 0

Answered

convert from datetimes to double

datenum() the datetime object. This is not preferred. Consider using a table object or better yet a timetable

convert from datetimes to double

datenum() the datetime object. This is not preferred. Consider using a table object or better yet a timetable

2 days ago | 0

Answered

M-script error while run it

You ask to sim() project3test . However if you look carefully at the first of your two images you will see that your real model ...

M-script error while run it

You ask to sim() project3test . However if you look carefully at the first of your two images you will see that your real model ...

2 days ago | 1

| accepted

Answered

Index exceeds the number of array elements (1).

You only assign to t(n) when n is 1, so t(1) exists but no other t location. You then increase n to 2 and expect t(2) to exist. ...

Index exceeds the number of array elements (1).

You only assign to t(n) when n is 1, so t(1) exists but no other t location. You then increase n to 2 and expect t(2) to exist. ...

2 days ago | 1

Answered

dealing with negative indices error

for T = 1 t = -1:1 end After that T is the scalar 1 and t is -1 0 1 F = X_temp + (((delta*eta)/(beta*r))*(1-exp(r...

dealing with negative indices error

for T = 1 t = -1:1 end After that T is the scalar 1 and t is -1 0 1 F = X_temp + (((delta*eta)/(beta*r))*(1-exp(r...

2 days ago | 0

Answered

Error using function. I get the error Array indices must be positive integers or logical values.

You have V(1,1) and you assign that to V_fun{1}. We do not know the datatype of V but we do know that indexing with () can never...

Error using function. I get the error Array indices must be positive integers or logical values.

You have V(1,1) and you assign that to V_fun{1}. We do not know the datatype of V but we do know that indexing with () can never...

2 days ago | 0

| accepted

Answered

When reading an image, why is the map value blank?

This is common. RGB images are r x c x 3 with an empty map CMYK images (tiff only) are r x c x 4 with an empty map RGBA...

When reading an image, why is the map value blank?

This is common. RGB images are r x c x 3 with an empty map CMYK images (tiff only) are r x c x 4 with an empty map RGBA...

2 days ago | 1

| accepted

Answered

how to generate a function using symbolic expression and plot that

Replace syms gamma With gamma = sym('gamma');

how to generate a function using symbolic expression and plot that

Replace syms gamma With gamma = sym('gamma');

2 days ago | 0

| accepted

Answered

Getting out of while loop when user says end

With r2017a or later you can also use answer == "Yes"

Getting out of while loop when user says end

With r2017a or later you can also use answer == "Yes"

2 days ago | 0

Answered

number format using solve

Why not? Those are the answers to the question you are asking of MATLAB. If you put them back through the equations, you will fi...

number format using solve

Why not? Those are the answers to the question you are asking of MATLAB. If you put them back through the equations, you will fi...

2 days ago | 0

Answered

Finding the Probability of a Sequence of Numbers

A= [10 13 10 1 111 102 10 13 7 10 112 100 14 116 102 10 14 120]; Ac = A.'; ...

Finding the Probability of a Sequence of Numbers

A= [10 13 10 1 111 102 10 13 7 10 112 100 14 116 102 10 14 120]; Ac = A.'; ...

2 days ago | 0

| accepted

Answered

Index exceeds the number of array elements (1). Caused by: Failure in initial nonlinear constraint function evaluation. FMINCON cannot continue.

constraint2 will be called with a vector the same size as the vector passed to the objective function. Your x0 in your fmincon c...

Index exceeds the number of array elements (1). Caused by: Failure in initial nonlinear constraint function evaluation. FMINCON cannot continue.

constraint2 will be called with a vector the same size as the vector passed to the objective function. Your x0 in your fmincon c...

2 days ago | 0

| accepted

Answered

I get an error stating "Not enough input arguments. Error in constraint2 (line 3) c(1)=x(n+6)-x(n+7);". Please Help

constraint2 will be called with a vector the same size as the vector passed to the objective function. Your x0 in your fmincon c...

I get an error stating "Not enough input arguments. Error in constraint2 (line 3) c(1)=x(n+6)-x(n+7);". Please Help

constraint2 will be called with a vector the same size as the vector passed to the objective function. Your x0 in your fmincon c...

2 days ago | 0

Answered

Index in position 1 exceeds array bounds (must not exceed 1).

Give the command dbstop if error and run the code. If the place it stops is not a try/catch or error() call, then you have fou...

Index in position 1 exceeds array bounds (must not exceed 1).

Give the command dbstop if error and run the code. If the place it stops is not a try/catch or error() call, then you have fou...

2 days ago | 1

Answered

real and imaginary part of complex number

V = complex(randi([-10 10],1), randi([-10 10])); %some data to work on syms n real Vn = V^(1/n); RV = rewrite( real(Vn),...

real and imaginary part of complex number

V = complex(randi([-10 10],1), randi([-10 10])); %some data to work on syms n real Vn = V^(1/n); RV = rewrite( real(Vn),...

2 days ago | 2

| accepted

Answered

Write Data to Excel

T = table(cellstr(var).', val.'); writetable(T, filename, 'Sheet', 1, 'Range', 'A1', 'writevariablenames', false)

Write Data to Excel

T = table(cellstr(var).', val.'); writetable(T, filename, 'Sheet', 1, 'Range', 'A1', 'writevariablenames', false)

2 days ago | 0

Answered

Fraction in label of a scatter plot

h = gobjects(1,2); h(1) = scatter(Base(:,1), Base(:,2), 30, 'b', 's', 'LineWidth', 2, 'DisplayName',' $\frac{X}{Y}$'); hold ...

Fraction in label of a scatter plot

h = gobjects(1,2); h(1) = scatter(Base(:,1), Base(:,2), 30, 'b', 's', 'LineWidth', 2, 'DisplayName',' $\frac{X}{Y}$'); hold ...

2 days ago | 0

| accepted

Answered

Warning: The DrawMode property will be removed in a future release. Use the SortMethod property instead. > In SixDofAnimation (line ...)

https://blogs.mathworks.com/graphics/2014/11/04/sortmethod/ https://www.mathworks.com/matlabcentral/answers/100094-what-determ...

Warning: The DrawMode property will be removed in a future release. Use the SortMethod property instead. > In SixDofAnimation (line ...)

https://blogs.mathworks.com/graphics/2014/11/04/sortmethod/ https://www.mathworks.com/matlabcentral/answers/100094-what-determ...

2 days ago | 1

| accepted