11,989 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 to avoid having duplicate index result?

If I assume, that this code satisfies your needs for 1 call: x = zeros(4, 4); x(sub2ind(size(x), 1:4, randperm(4,4))) = 1; I ...

How to avoid having duplicate index result?

If I assume, that this code satisfies your needs for 1 call: x = zeros(4, 4); x(sub2ind(size(x), 1:4, randperm(4,4))) = 1; I ...

약 3시간 ago | 0

Answered

How to convert UTC timestamp to unix time in MATLAB with the respect of leap seconds

It depends on how the unix time stamps are created. Actually unix time and UTC is synchronized. Then computers writing time stam...

How to convert UTC timestamp to unix time in MATLAB with the respect of leap seconds

It depends on how the unix time stamps are created. Actually unix time and UTC is synchronized. Then computers writing time stam...

약 3시간 ago | 0

Answered

Display figure returned by .m function into GUI axis

"setting a figure returned by a .m file into matlab guide axis" - this is not clear yet. I guess the "m file" is the function El...

Display figure returned by .m function into GUI axis

"setting a figure returned by a .m file into matlab guide axis" - this is not clear yet. I guess the "m file" is the function El...

약 5시간 ago | 0

Answered

Conversion from unix time string to uint64

The conversion by str2double creates a double, which uses 53 bits only. With sscanf you can get 64 significant bits to store the...

Conversion from unix time string to uint64

The conversion by str2double creates a double, which uses 53 bits only. With sscanf you can get 64 significant bits to store the...

약 5시간 ago | 0

Answered

Matlab for research purpose

Code published in the FileExchange is covered by the BSD license. Simply read the included file to see, how to include the code:...

Matlab for research purpose

Code published in the FileExchange is covered by the BSD license. Simply read the included file to see, how to include the code:...

약 23시간 ago | 0

| accepted

Answered

How can I split a text file into many files?

S = fileread('YourFile.txt'); C = strsplit(S, char(10)); ini = find(strncmp(C, 'STARTSEC ', 9)); fin = find(strncmp(C, 'ENDSE...

How can I split a text file into many files?

S = fileread('YourFile.txt'); C = strsplit(S, char(10)); ini = find(strncmp(C, 'STARTSEC ', 9)); fin = find(strncmp(C, 'ENDSE...

약 23시간 ago | 0

Answered

Splitting a matrix based on certain values in the rows

A = [911 911; 0 2; 8 5; 7 3; 911 911; 5 3; 1 6; ...

Splitting a matrix based on certain values in the rows

A = [911 911; 0 2; 8 5; 7 3; 911 911; 5 3; 1 6; ...

2일 ago | 0

Answered

Outer product of two rectangular matrices

If you have a [N x M] array and a [R x S x T] array, the output product becomes [N x M x R x S x T]. This can be done with neste...

Outer product of two rectangular matrices

If you have a [N x M] array and a [R x S x T] array, the output product becomes [N x M x R x S x T]. This can be done with neste...

2일 ago | 1

Answered

Looping for calculate parameter

With a FOR loop: S = 0; for k = 1:numel(a) S = S + a(k) * F(:, k); end Or without a loop: S = F(:, 1:numel(a)) * a(:);...

Looping for calculate parameter

With a FOR loop: S = 0; for k = 1:numel(a) S = S + a(k) * F(:, k); end Or without a loop: S = F(:, 1:numel(a)) * a(:);...

3일 ago | 0

| accepted

Answered

licence on virtual machine

This is the public forum. Please contact the official support team of Mathworks. Use the "Contact Us" link on top of this page.

licence on virtual machine

This is the public forum. Please contact the official support team of Mathworks. Use the "Contact Us" link on top of this page.

3일 ago | 0

Answered

Why the encryption doesn't work correctly? (SHA-256, HMAC-SHA-512)

Your call of DataHash creates the hash considering the class of the obejct. You want to get the hash for the values only. chall...

Why the encryption doesn't work correctly? (SHA-256, HMAC-SHA-512)

Your call of DataHash creates the hash considering the class of the obejct. You want to get the hash for the values only. chall...

3일 ago | 0

| accepted

Answered

How to use intersect command with a tolerance value?

While ismembertol might be useful, I'm still puzzled by the way it defines the tolerance. If the vectors are not too large (som...

How to use intersect command with a tolerance value?

While ismembertol might be useful, I'm still puzzled by the way it defines the tolerance. If the vectors are not too large (som...

6일 ago | 1

Answered

How to use only specific files in directory in GUI?

folder = uigetdir('Choose a folder'); List = dir(fullfile(folder, 'PU*.*')); FileName = fullfile(folder, {List.name}); ...

How to use only specific files in directory in GUI?

folder = uigetdir('Choose a folder'); List = dir(fullfile(folder, 'PU*.*')); FileName = fullfile(folder, {List.name}); ...

6일 ago | 0

Answered

How can i increase the variabile name of each vector in for cycle? I want CM0_0, CM0_1, CM0_2...

Don't do this. Do not hide an index in the name of a variable. Use an array instead, e.g.: CM0{1}, CM0{2}, CM0{3} See this fam...

How can i increase the variabile name of each vector in for cycle? I want CM0_0, CM0_1, CM0_2...

Don't do this. Do not hide an index in the name of a variable. Use an array instead, e.g.: CM0{1}, CM0{2}, CM0{3} See this fam...

6일 ago | 2

| accepted

Answered

Using index data to fill a matrix

This works with a loop easily: D = ExtractedData; % Easier to read... MaxRow = max(D(:, 1)); MaxCol = max(D(:, 2)); To...

Using index data to fill a matrix

This works with a loop easily: D = ExtractedData; % Easier to read... MaxRow = max(D(:, 1)); MaxCol = max(D(:, 2)); To...

6일 ago | 0

| accepted

Answered

Regarding matrix similarity of image with rotation and scaling

I can recommend to search in the net at first, if you have a question. Then you will find e.g.: https://www.mathworks.com/help/...

Regarding matrix similarity of image with rotation and scaling

I can recommend to search in the net at first, if you have a question. Then you will find e.g.: https://www.mathworks.com/help/...

6일 ago | 0

Answered

Resizing pixels with independent scaling factor?

Let's start with a working loop: w = 8; im = repmat(uint8(255), w, w); im(2,2,:) = 0; im(6,6,:) = 0; row = [2;6]; col...

Resizing pixels with independent scaling factor?

Let's start with a working loop: w = 8; im = repmat(uint8(255), w, w); im(2,2,:) = 0; im(6,6,:) = 0; row = [2;6]; col...

6일 ago | 0

| accepted

Answered

Deleting the row of a 3D matrix with a condition

Of course you cannot delete one row in a 3D array: The resulting array must have the same length for all subvectors. Removing a ...

Deleting the row of a 3D matrix with a condition

Of course you cannot delete one row in a 3D array: The resulting array must have the same length for all subvectors. Removing a ...

6일 ago | 0

Answered

Looping through 3rd dimension

Your loop has 19 iterations. It is not clear, why you expect that the output has a size of 30 or 540 in the 3rd dimension. [i:i...

Looping through 3rd dimension

Your loop has 19 iterations. It is not clear, why you expect that the output has a size of 30 or 540 in the 3rd dimension. [i:i...

7일 ago | 0

| accepted

Answered

Out of memory during calculating covariance norm matrix

The wanted 128'541*128'541 matrix has 16'522'788'681 elements and it needs 132'182'309'448 Bytes of RAM: 132 GB. As a rule of th...

Out of memory during calculating covariance norm matrix

The wanted 128'541*128'541 matrix has 16'522'788'681 elements and it needs 132'182'309'448 Bytes of RAM: 132 GB. As a rule of th...

7일 ago | 1

| accepted

Answered

Vectorization the Legendre Polynomial Without loop

Are you sure the the code is working? You calculate the vectors P(i, :) but use the first element only: P(i): P(i+1,:) = -(...

Vectorization the Legendre Polynomial Without loop

Are you sure the the code is working? You calculate the vectors P(i, :) but use the first element only: P(i): P(i+1,:) = -(...

7일 ago | 0

| accepted

Answered

How to import raster file to Matlab

What about https://www.mathworks.com/matlabcentral/fileexchange/24313-arcmap-raster-asc-to-xyz-file ?

How to import raster file to Matlab

What about https://www.mathworks.com/matlabcentral/fileexchange/24313-arcmap-raster-asc-to-xyz-file ?

7일 ago | 0

Answered

Passing an image between GUIDE GUI's

Do not use global variables to share data. You find thousands of threads concerning Matlab or other programming languages, which...

Passing an image between GUIDE GUI's

Do not use global variables to share data. You find thousands of threads concerning Matlab or other programming languages, which...

7일 ago | 1

Answered

Combining arrays of different row length

See: FileExchange: padcat With a simple loop: function A = CatWithPadding(varargin) C = varargin; nC = numel(C); len = c...

Combining arrays of different row length

See: FileExchange: padcat With a simple loop: function A = CatWithPadding(varargin) C = varargin; nC = numel(C); len = c...

8일 ago | 0

Answered

Linearly "interpolate" a 1-dimensional vector

What's wrong with interp1? pops = flipud(pop(:,2)); n = numel(pops); weekpop = interp1(1:n, pops, linspace(1, n, (n-...

Linearly "interpolate" a 1-dimensional vector

What's wrong with interp1? pops = flipud(pop(:,2)); n = numel(pops); weekpop = interp1(1:n, pops, linspace(1, n, (n-...

8일 ago | 0

| accepted

Answered

if function for array

x=[52.23;52.45;56.32;55.48;56.32;53.39;55.53;53.67;57.89] subplot(2,2,1) plot(x) subplot(2,2,2) index = find(52 < x && x <...

if function for array

x=[52.23;52.45;56.32;55.48;56.32;53.39;55.53;53.67;57.89] subplot(2,2,1) plot(x) subplot(2,2,2) index = find(52 < x && x <...

8일 ago | 0

Answered

Install older versions of MATLAB

When does the question for selecting the folder occur? During downloading or during the installation? Do not install the Matlab ...

Install older versions of MATLAB

When does the question for selecting the folder occur? During downloading or during the installation? Do not install the Matlab ...

9일 ago | 0

Answered

Anonymous function inside of function file

Your anonymous function CfromF takes one input and converts its contents. In your code you call this function without an input a...

Anonymous function inside of function file

Your anonymous function CfromF takes one input and converts its contents. In your code you call this function without an input a...

9일 ago | 0

Answered

Count the occurence of a number in between other numbers

With FEX: RunLength : [B, N] = RunLength(x); Result = N(B == 0) If you do not have a C-compiler installed, use RunLength_M fr...

Count the occurence of a number in between other numbers

With FEX: RunLength : [B, N] = RunLength(x); Result = N(B == 0) If you do not have a C-compiler installed, use RunLength_M fr...

9일 ago | 2

Answered

How to read sequence of pcd files

No, the standard method to import files in a loop works for any kind of input. Please post your code and explain, why you assume...

How to read sequence of pcd files

No, the standard method to import files in a loop works for any kind of input. Please post your code and explain, why you assume...

9일 ago | 0