1.536 total contributions since 2017

E-mails with feedback/questions about FEX submissions are welcomed. In general I will post e-mails about Answers on the related page, unless there is good cause not to do so.

Answered

Parallel for loop in loading files

Removing clear all from your code and loading to a struct (instead of poofing variables into existence) should allow you to repl...

Parallel for loop in loading files

Removing clear all from your code and loading to a struct (instead of poofing variables into existence) should allow you to repl...

ongeveer 6 uur ago | 0

Answered

Distance between ALL(all combinations) points of matrix

Note that you are not calculating only unique combinations. The reason you are only getting a single value is that you are not i...

Distance between ALL(all combinations) points of matrix

Note that you are not calculating only unique combinations. The reason you are only getting a single value is that you are not i...

ongeveer 14 uur ago | 0

| accepted

Answered

How to find minimum number of largest square of 1 in an 2D bool matrix

You could try a convolution with different size kernels, but I doubt that is the most efficient way to do it.

How to find minimum number of largest square of 1 in an 2D bool matrix

You could try a convolution with different size kernels, but I doubt that is the most efficient way to do it.

ongeveer 20 uur ago | 0

Answered

how to convert a 3-d binary array of spherical cordinates into floating type array of cartesian cordinates

If you get my findND function from the FEX you can do this: %find 3D indices in M [r,c,p]=findND(M); %create lookup tables ...

how to convert a 3-d binary array of spherical cordinates into floating type array of cartesian cordinates

If you get my findND function from the FEX you can do this: %find 3D indices in M [r,c,p]=findND(M); %create lookup tables ...

4 dagen ago | 0

| accepted

Answered

b=abs([b;a(i)-a(i+1)]); error

Your loop goes up to 27, and inside the loop you look at i+1. You should let your loop go to |numel(a)-1| instead of 27.

b=abs([b;a(i)-a(i+1)]); error

Your loop goes up to 27, and inside the loop you look at i+1. You should let your loop go to |numel(a)-1| instead of 27.

4 dagen ago | 0

Answered

Why is matlab giving me a a very small number when the answer should be EXACTLY zero?

Because not all numbers can be stored as an exact binary number, some calculations will have rounding errors. %exagerated examp...

Why is matlab giving me a a very small number when the answer should be EXACTLY zero?

Because not all numbers can be stored as an exact binary number, some calculations will have rounding errors. %exagerated examp...

4 dagen ago | 1

Answered

Find and count how many capital characters are in str, and then change them to lower cases USING LOOPS

You can easily do this without loops: s = 'This is my String with CapiTal LETTERS in it. Let''s change them to lowercase uSiNg ...

Find and count how many capital characters are in str, and then change them to lower cases USING LOOPS

You can easily do this without loops: s = 'This is my String with CapiTal LETTERS in it. Let''s change them to lowercase uSiNg ...

5 dagen ago | 0

Answered

blockproc applied to ROI images

Using a nested function will allow you to share variables without having to resort to evalin. As for your actual problem: you co...

blockproc applied to ROI images

Using a nested function will allow you to share variables without having to resort to evalin. As for your actual problem: you co...

5 dagen ago | 0

Answered

Precise Matrix Power: A^k

It will probably be helpfull to use the Symbolic Math Toolbox, and use the tips explained here. For mod(a^b,k) there is a direct...

Precise Matrix Power: A^k

It will probably be helpfull to use the Symbolic Math Toolbox, and use the tips explained here. For mod(a^b,k) there is a direct...

5 dagen ago | 0

| accepted

Answered

how to extract data after squeeze the matrix?

Something like this is probably what you're looking for, although it makes it more difficult to compare the same pixel over all ...

how to extract data after squeeze the matrix?

Something like this is probably what you're looking for, although it makes it more difficult to compare the same pixel over all ...

6 dagen ago | 0

| accepted

Answered

Return a vector with the same size as the indexing matrix/vector (code optimization)

I would have expected Matlab to have consistent behavior, but before now I hadn't bothered to look it up in the documentation. Y...

Return a vector with the same size as the indexing matrix/vector (code optimization)

I would have expected Matlab to have consistent behavior, but before now I hadn't bothered to look it up in the documentation. Y...

6 dagen ago | 1

| accepted

Answered

off figure in matlab

You need to define a group array if you want to use the off switch. The <https://www.mathworks.com/help/stats/anova1.html docume...

off figure in matlab

You need to define a group array if you want to use the off switch. The <https://www.mathworks.com/help/stats/anova1.html docume...

8 dagen ago | 0

| accepted

Answered

Error message: Brace indexing is not supported for variables of this type.

The uigetfile function only returns a cell array if the user actually selects multiple files. The person writing the code should...

Error message: Brace indexing is not supported for variables of this type.

The uigetfile function only returns a cell array if the user actually selects multiple files. The person writing the code should...

9 dagen ago | 0

| accepted

Answered

WTH happened to "hold on all" in 2019b

Nowhere in the documentation could I find any mention of hold on all being a valid syntax. Before R2014b on and all had a differ...

WTH happened to "hold on all" in 2019b

Nowhere in the documentation could I find any mention of hold on all being a valid syntax. Before R2014b on and all had a differ...

9 dagen ago | 1

Answered

From a set of curves, how to find the one that the "most similar" to the reference curve?

Apart from all the 'boring' strategies of using tried and tested goodness-of-fit parameters (many of which are implemented in ba...

From a set of curves, how to find the one that the "most similar" to the reference curve?

Apart from all the 'boring' strategies of using tried and tested goodness-of-fit parameters (many of which are implemented in ba...

9 dagen ago | 0

Answered

Image Processing Averaging Filter

This should show you one of the multiple way to do this. %clc;clear all;%you aren't printing anything to the command window, no...

Image Processing Averaging Filter

This should show you one of the multiple way to do this. %clc;clear all;%you aren't printing anything to the command window, no...

10 dagen ago | 0

Answered

replace element in matrix with matrix

(written on mobile, untested code) Out=cell2mat(arrayfun(@(x) circshift(eye(3),x),'UniformOutput', false));

replace element in matrix with matrix

(written on mobile, untested code) Out=cell2mat(arrayfun(@(x) circshift(eye(3),x),'UniformOutput', false));

10 dagen ago | 0

| accepted

Answered

For loop without repetition

Use <https://www.mathworks.com/help/matlab/ref/perms.html perms> to generate the list of all combinations and loop through the r...

For loop without repetition

Use <https://www.mathworks.com/help/matlab/ref/perms.html perms> to generate the list of all combinations and loop through the r...

10 dagen ago | 0

Answered

path of a mfile not on search path

As suggested in a comment <https://www.mathworks.com/matlabcentral/answers/484121-how-to-grab-message-from-command-window-and-ta...

path of a mfile not on search path

As suggested in a comment <https://www.mathworks.com/matlabcentral/answers/484121-how-to-grab-message-from-command-window-and-ta...

11 dagen ago | 0

| accepted

Answered

How to assign each axes to hold/keep its own image?

You should never use gcf or gca in code for a GUI. As your tags indicate you're using GUIDE: use the explicit handles to the axe...

How to assign each axes to hold/keep its own image?

You should never use gcf or gca in code for a GUI. As your tags indicate you're using GUIDE: use the explicit handles to the axe...

11 dagen ago | 1

| accepted

Answered

Checking of equality for two matrices

The difference between the isequal function and the == operator is that the second will work element by element. That means that...

Checking of equality for two matrices

The difference between the isequal function and the == operator is that the second will work element by element. That means that...

11 dagen ago | 0

Answered

Function definition is misplaced or improperly nested. Please help!!

Replace this function function Xi_dot = pose_dot(t,Xi,dt,v,omega); with this function Xi_dot = pose_dot(t,Xi,dt,v,omega)

Function definition is misplaced or improperly nested. Please help!!

Replace this function function Xi_dot = pose_dot(t,Xi,dt,v,omega); with this function Xi_dot = pose_dot(t,Xi,dt,v,omega)

11 dagen ago | 1

Answered

Make an interactive plot which will allow you to draw a continuous line with 3 segments

You're only supplying single points to the plot function. If you want a line, you should first gather all the points and then ca...

Make an interactive plot which will allow you to draw a continuous line with 3 segments

You're only supplying single points to the plot function. If you want a line, you should first gather all the points and then ca...

12 dagen ago | 0

Question

How to create a GUI

There are multiple ways to create a graphical user interface (GUI) in Matlab. Which method is the best depends on multiple facto...

13 dagen ago | 2 answers | 3

Answered

Hide and change location of pushbutton in GUI?

You can set the Position property of a uicontrol object to move it to any location you like inside the callback that sets the Vi...

Hide and change location of pushbutton in GUI?

You can set the Position property of a uicontrol object to move it to any location you like inside the callback that sets the Vi...

13 dagen ago | 0

| accepted

Submitted

maximize

Maximize the figure window (multiple strategies implemented)

14 dagen ago | 13 downloads |

Answered

Can I get the MATLAB software for 32 bit I need that

You will need to download R2015b or older. Newer releases don't have a 32 bit version. You should be able to select older releas...

Can I get the MATLAB software for 32 bit I need that

You will need to download R2015b or older. Newer releases don't have a 32 bit version. You should be able to select older releas...

15 dagen ago | 0

| accepted

Answered

Reshape a 3D matrix

The code below should do what you want: x = [1 2 3]; y = [4 5 6]; z = [7 8 9]; [X,Y,Z] = meshgrid(x,y,z); A=round(rand*X+ra...

Reshape a 3D matrix

The code below should do what you want: x = [1 2 3]; y = [4 5 6]; z = [7 8 9]; [X,Y,Z] = meshgrid(x,y,z); A=round(rand*X+ra...

15 dagen ago | 0