12,423 total contributions since 2009

It is easier to solve a problem than to guess, what the problem is.

Questions about FileExchange submissions are welcome - get my address from the code. I do not answer mails concerning questions in the forum.

Answered

¿how can I show a matrix of type -cell- in a msgbox?

Maybe this helps: https://www.mathworks.com/matlabcentral/fileexchange/9776-showcell-cell-disp

¿how can I show a matrix of type -cell- in a msgbox?

Maybe this helps: https://www.mathworks.com/matlabcentral/fileexchange/9776-showcell-cell-disp

2 hours ago | 0

Answered

i need to make a matrix count a given set of repeated elements but it doesnt work at all

Maybe all you need is: [Lia, LocB] = ismember(points, coor, 'rows'); n = histcounts(LocB, 1:size(B, 1))

i need to make a matrix count a given set of repeated elements but it doesnt work at all

Maybe all you need is: [Lia, LocB] = ismember(points, coor, 'rows'); n = histcounts(LocB, 1:size(B, 1))

2 hours ago | 0

Answered

Matrix product error accumulated during iteration

You can find the nearest unitary matrix in each iteration using an SVD: for t_i = 1:100 [S,~,D] = svd(U * U); U ...

Matrix product error accumulated during iteration

You can find the nearest unitary matrix in each iteration using an SVD: for t_i = 1:100 [S,~,D] = svd(U * U); U ...

2 hours ago | 0

| accepted

Answered

How to make grid lines visible while Axis is invisible?

The question is a little bit confusing for me. An invisible axes does not have visible properties. But you can create a visible ...

How to make grid lines visible while Axis is invisible?

The question is a little bit confusing for me. An invisible axes does not have visible properties. But you can create a visible ...

20 hours ago | 0

Answered

MATLAB GUI JAVA Error (Matlab2018b, win10)

When uninstalling & re-installing Matlab does not help, the problem can be conserved in the preferences files. These are not rep...

MATLAB GUI JAVA Error (Matlab2018b, win10)

When uninstalling & re-installing Matlab does not help, the problem can be conserved in the preferences files. These are not rep...

22 hours ago | 0

Answered

waitbar closing at random times

Set a breakpoint in te code, which closes the waitbar. Then you can inspect the reasons why it does so. My first guess is that ...

waitbar closing at random times

Set a breakpoint in te code, which closes the waitbar. Then you can inspect the reasons why it does so. My first guess is that ...

22 hours ago | 0

Answered

MATLAB R2014b not working anymore. Windows 10

What exactly is "just" in "it just stopped working" ? What happened before? Did you install the Windows 10 1903 update? I'm run...

MATLAB R2014b not working anymore. Windows 10

What exactly is "just" in "it just stopped working" ? What happened before? Did you install the Windows 10 1903 update? I'm run...

1 day ago | 0

Answered

Is MATLAB compatible with Windows 10?

I'm running R2009a/32&64 and the Windows SDK7.1 as compiler successfully under Windows 10.

Is MATLAB compatible with Windows 10?

I'm running R2009a/32&64 and the Windows SDK7.1 as compiler successfully under Windows 10.

1 day ago | 0

Answered

Divide the array of cells

The error message means, that Gll is not a cell array, but something else. Then you cannot use the curly braces for indexing. W...

Divide the array of cells

The error message means, that Gll is not a cell array, but something else. Then you cannot use the curly braces for indexing. W...

1 day ago | 0

Answered

Is it possible to build custom UI components in app designer that can be visually re-used in app designer?

nonce = {'00' '11' '22' '33' '44' '55'}; toAdd = hex2dec('01'); for k = 1:5 nonce{k} = dec2hex(hex2dec(nonce{k}) + toAdd)...

Is it possible to build custom UI components in app designer that can be visually re-used in app designer?

nonce = {'00' '11' '22' '33' '44' '55'}; toAdd = hex2dec('01'); for k = 1:5 nonce{k} = dec2hex(hex2dec(nonce{k}) + toAdd)...

1 day ago | 0

Answered

How to plot several curves on the same figure plot with the same StartTime

Do you mean https://www.mathworks.com/help/matlab/ref/timeseries.synchronize.html ?

How to plot several curves on the same figure plot with the same StartTime

Do you mean https://www.mathworks.com/help/matlab/ref/timeseries.synchronize.html ?

1 day ago | 0

| accepted

Answered

r2018a: newer MATLAB version can't automatically determine the correct xlim and ylim for plots

The question is not clear, because there is no unique definition of what is "the correct xlim and ylim" value. It is a question ...

r2018a: newer MATLAB version can't automatically determine the correct xlim and ylim for plots

The question is not clear, because there is no unique definition of what is "the correct xlim and ylim" value. It is a question ...

1 day ago | 0

Answered

i am trying to segment MRI images using Kmeans but i can not solve this problem "" Error using reshape To RESHAPE the number of elements must not change. Error in (line 148) AA1=reshape(Cluster1,[wd wd]);"" ,any help please?

You define [r, c] = size(Input); Length = r*c; Cluster1=zeros(Length,1); wd=256; In the line AA1=reshape(Cluster1,[wd wd]...

i am trying to segment MRI images using Kmeans but i can not solve this problem "" Error using reshape To RESHAPE the number of elements must not change. Error in (line 148) AA1=reshape(Cluster1,[wd wd]);"" ,any help please?

You define [r, c] = size(Input); Length = r*c; Cluster1=zeros(Length,1); wd=256; In the line AA1=reshape(Cluster1,[wd wd]...

2 days ago | 0

Answered

Solving all math and teaching it as you go

This will be an extremely demanding project. You find some software which can simplify symbolic expressions, e.g. Matlab's Symbo...

Solving all math and teaching it as you go

This will be an extremely demanding project. You find some software which can simplify symbolic expressions, e.g. Matlab's Symbo...

5 days ago | 2

| accepted

Answered

Help running a while loop?

Use a for loop if the number of steps is known in advance: A(1) = 1E10; dt = 0.1; for t = 1:1001 dA(t) = -0.005 * A(t); ...

Help running a while loop?

Use a for loop if the number of steps is known in advance: A(1) = 1E10; dt = 0.1; for t = 1:1001 dA(t) = -0.005 * A(t); ...

5 days ago | 0

Answered

how to initialize the permutation sequence ?

Maybe you mean: T = num2cell(randperm(65536, 65536));

how to initialize the permutation sequence ?

Maybe you mean: T = num2cell(randperm(65536, 65536));

5 days ago | 0

| accepted

Answered

How to create a vector by iteration

The break stops the for loop, but there is no exit from the outer while loop: while true for ii = 1 : length(t) Fne...

How to create a vector by iteration

The break stops the for loop, but there is no exit from the outer while loop: while true for ii = 1 : length(t) Fne...

5 days ago | 0

| accepted

Answered

How can a code run on a single image perfectly, but the same code on an entire database crashes? Where am I going wrong?

Use the debugger to find the reason of the problem. Let Matlab stop, when the error occurs: dbstop if error Then run the code ...

How can a code run on a single image perfectly, but the same code on an entire database crashes? Where am I going wrong?

Use the debugger to find the reason of the problem. Let Matlab stop, when the error occurs: dbstop if error Then run the code ...

5 days ago | 0

| accepted

Answered

Mystery Error; same code runs fine the 2nd time, but not the 1st!

Without seeing the relevant part of the code, answering is based on guessing. I guess, that your code is a script and not a fun...

Mystery Error; same code runs fine the 2nd time, but not the 1st!

Without seeing the relevant part of the code, answering is based on guessing. I guess, that your code is a script and not a fun...

5 days ago | 0

| accepted

Answered

How do you remove duplicates of nested cells?

A loop approach: C = RomanticGestures; n = numel(C); remove = false(1, n); for i1 = 1:n for i2 = i1 + 1:n if ~...

How do you remove duplicates of nested cells?

A loop approach: C = RomanticGestures; n = numel(C); remove = false(1, n); for i1 = 1:n for i2 = i1 + 1:n if ~...

5 days ago | 0

Answered

How do I convert to Mex from Cpp using Xcode ver 10

Wow, what an inefficient communication. As Walter has said already, the line const int *DimsBness; must be changed to co...

How do I convert to Mex from Cpp using Xcode ver 10

Wow, what an inefficient communication. As Walter has said already, the line const int *DimsBness; must be changed to co...

7 days ago | 1

Answered

Access index in cells.

What ever app.subImage was before, after: app.subImage = round(app.SliderChosenCell.Value); it is a scalar number with an inte...

Access index in cells.

What ever app.subImage was before, after: app.subImage = round(app.SliderChosenCell.Value); it is a scalar number with an inte...

7 days ago | 0

Answered

Graph with string variable

You did not even make an attempt? data = readmatrix('data.xlsx'); plot(data(:, 1), data(:, 2), 'r', ... data(:, 1), data...

Graph with string variable

You did not even make an attempt? data = readmatrix('data.xlsx'); plot(data(:, 1), data(:, 2), 'r', ... data(:, 1), data...

7 days ago | 0

Answered

Need help creating a for loop

v = nonzeros((5:5:95).' .* fliplr(triu(ones(19)))).'

Need help creating a for loop

v = nonzeros((5:5:95).' .* fliplr(triu(ones(19)))).'

8 days ago | 0

Answered

How to write strings and numbers to a text file

Do you really want to create: *DIM,table_press_data_1,TABLE,6146,120,1,PN,PT *TREAD,table_press_data_1,'press_data_1','csv',''...

How to write strings and numbers to a text file

Do you really want to create: *DIM,table_press_data_1,TABLE,6146,120,1,PN,PT *TREAD,table_press_data_1,'press_data_1','csv',''...

8 days ago | 0

Answered

Why is ODE45 using so many intervals?

Do you want to reduce the number of evaluated steps to reduce the processing time, or is it enough to reduce the size of teh out...

Why is ODE45 using so many intervals?

Do you want to reduce the number of evaluated steps to reduce the processing time, or is it enough to reduce the size of teh out...

9 days ago | 1

Answered

Rotating 3D cloud matrix data

Multiplacte the data with a rotation matrix, e.g. obtained by: https://www.mathworks.com/matlabcentral/fileexchange/66446-rotati...

Rotating 3D cloud matrix data

Multiplacte the data with a rotation matrix, e.g. obtained by: https://www.mathworks.com/matlabcentral/fileexchange/66446-rotati...

9 days ago | 0

Answered

What is the efficient way to parse file without fscanf or testscan

I've created a test file at first: fid = fopen('myfile.txt', 'w'); fprintf(fid,'%.0g %16f %16f %16f %8f %8f\n', rand(6, n)); ...

What is the efficient way to parse file without fscanf or testscan

I've created a test file at first: fid = fopen('myfile.txt', 'w'); fprintf(fid,'%.0g %16f %16f %16f %8f %8f\n', rand(6, n)); ...

9 days ago | 0

| accepted

Answered

How can I convert a binary fraction to decimal?

'11001' means: 1*2^0 + 0*2^1 + 0*2^2 + 1*2^3 + 1*2^4 or: [1,1,0,0,1] * 2 .^ (4:-1:0).' (this is what happens inside bin2dec - ...

How can I convert a binary fraction to decimal?

'11001' means: 1*2^0 + 0*2^1 + 0*2^2 + 1*2^3 + 1*2^4 or: [1,1,0,0,1] * 2 .^ (4:-1:0).' (this is what happens inside bin2dec - ...

10 days ago | 2

| accepted

Answered

Gridlines when exporting .pdf in Word 2016

You can replace the grid my drawing the lines manually with the wanted color. Would this solve the problem? aAxesH = axes('Next...

Gridlines when exporting .pdf in Word 2016

You can replace the grid my drawing the lines manually with the wanted color. Would this solve the problem? aAxesH = axes('Next...

10 days ago | 0