11.985 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

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:...

etwa 3 Stunden ago | 0

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...

etwa 4 Stunden 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; ...

ein Tag 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...

ein Tag 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(:);...

2 Tage 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.

2 Tage 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...

2 Tage 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...

5 Tage 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}); ...

5 Tage 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...

5 Tage 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...

5 Tage 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/...

5 Tage 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...

5 Tage 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 ...

5 Tage 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...

6 Tage 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...

6 Tage 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,:) = -(...

6 Tage 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 ?

6 Tage 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...

6 Tage 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...

7 Tage 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-...

7 Tage 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 <...

7 Tage 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 ...

8 Tage 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...

8 Tage 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...

8 Tage 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...

8 Tage ago | 0

Answered

filtering and combining signals

You need a scientific decision for a filter, not an opinion from the forum. Is there any evidence that a median filter does not ...

filtering and combining signals

You need a scientific decision for a filter, not an opinion from the forum. Is there any evidence that a median filter does not ...

8 Tage ago | 0

Answered

Deleting temporal path files

Open the tool to manage the path: pathtool There is a corresponding button in the toolbar also. See also: https://www.mathwor...

Deleting temporal path files

Open the tool to manage the path: pathtool There is a corresponding button in the toolbar also. See also: https://www.mathwor...

8 Tage ago | 1

| accepted

Answered

Wrong dates on axis when plotting from xlsx file

Do you see, that you use "MM" for minutes and months? The format strings for the date format are case-sensitive. b=datestr(y_ne...

Wrong dates on axis when plotting from xlsx file

Do you see, that you use "MM" for minutes and months? The format strings for the date format are case-sensitive. b=datestr(y_ne...

8 Tage ago | 1

| accepted

Answered

Save a file inside a subfolder of a folder

function out = functionTiago(A, Folder) subFolder = fullfile(Folder, 'SUBFOLDER'); mkdir(subFolder) out = A + 5; save(fullfi...

Save a file inside a subfolder of a folder

function out = functionTiago(A, Folder) subFolder = fullfile(Folder, 'SUBFOLDER'); mkdir(subFolder) out = A + 5; save(fullfi...

9 Tage ago | 0

| accepted