Community Profile

photo

Jan


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

Jan's Badges

  • Grand Master
  • Revival Level 4
  • 36 Month Streak
  • Thankful Level 4
  • Knowledgeable Level 4
  • First Answer
  • Promoter
  • Commenter
  • Solver

View details...

Contributions in
View by

Answered
how to get the x value for a given y value?
You cannot expect that any of the points at t = -0.5:1/Fs:0.5 is exactly 0.5*max(x). Remember that you evaluate x at some time s...

ongeveer 5 uur ago | 0

Answered
How programmatically know if an Update is installed for a particular matlab release?
Yes. See the output of version: 9.6.0.1114505 (R2019a) Update 2 With ver('Matlab') you get the version number only. But wi...

ongeveer 6 uur ago | 0

Answered
How to increase java heap memory in a dll?
I cannot check it with a compiled application. But inside Matlab you can hack the preferences file. At first check the current h...

ongeveer 7 uur ago | 0

Answered
"Error using cell2struct Number of field names must match number of fields in new structure. Error in matrix_from_rasters (line 9) hdr = cell2struct(num2cell(hdr{2}),hdr{1});"
Use the debugger to examine, whats going on. Either set a breakpoint in the failing line, or stop Matlab automatically if an err...

ongeveer 8 uur ago | 0

Answered
convert from cell array to vector
a ={'1','2','3','4','5','6','7','8','8'}; n = str2double(a) This can be faster under some conditions: n = sscanf(sprintf('%s ...

ongeveer 8 uur ago | 1

| accepted

Answered
Access to data without reading all of it
It is a very bad idea to create a huge data set with a size of 2 TB as text files. Do the files have a fixed width for all lines...

3 dagen ago | 0

Submitted


DataHash
MD5 or SHA hash for array, struct, cell or file

3 dagen ago | 78 downloads |

Answered
Is MathWorks working on a dark mode for MATLAB similar to what Visual Studio offers?
I'm using Matlab Schemer from the FileExchange successfully and I'm happy with it. Unfortunately I cannot set Windows to the dar...

3 dagen ago | 0

Answered
How can I define two tones in a grayscale image
You cannot eliminate colors in a gray-scale image, but only set them to another value. img(img > 67 & img < 128) = 0; Here all...

3 dagen ago | 2

| accepted

Answered
Attempting to use complex variable results in input array non-numeric error for polyval
Of course neither the char vector 'G11' nor any tricks with num2str can solve the problem. But hiding indoices in the names of v...

3 dagen ago | 0

| accepted

Answered
how to save errors
failures = struct('iter', {}, 'str', {}); for i = 1:10 try output1=some_function1(input1,input2) output2=some_f...

3 dagen ago | 0

| accepted

Answered
Convert values upper triangular matrix into vector
At = A.'; m = tril(true(size(At))); v = At(m).' Maybe this is faster (>=R2016b due to auto-expanding): At = A.'; m = (1:...

5 dagen ago | 1

| accepted

Answered
Why can't I run my python script from Matlab?
See https://www.mathworks.com/help/matlab/call-python-libraries.html and https://www.mathworks.com/help/matlab/matlab_external/s...

5 dagen ago | 2

Answered
How do I take the average of every n values in a vector?
x = rand(399277, 1); % Some example data n = 1000; % Number of elements to create the mean over s1 = size(x, 1)...

5 dagen ago | 7

Answered
How to make a colour picker similar to this one in Matlab?
This looks similar to the built-in uisetcolor of R2019b, see https://www.mathworks.com/help/matlab/ref/uisetcolor.html -> Select...

6 dagen ago | 0

| accepted

Answered
Is it possible to make 'uisetcolor' integrated in GUI?
See https://undocumentedmatlab.com/blog/color-selection-components Here you find some examples for color pickers. I assume you ...

6 dagen ago | 0

Answered
Select random data from a matrix and replace it
A logical mask is much simpler than handling the indices: A = randi([0,1], 8, 8); % Test data p = 4; mask = (cumsum(A,...

6 dagen ago | 0

Answered
Pending Approval for File Exchange
You can contact MathWorks by using the Contact button on top of this page: the phone icon. Direct link: https://www.mathworks.co...

6 dagen ago | 0

| accepted

Answered
While loop does not repeat
The code should not work at all, because i is not defined before while i <= size(first_firm,1) But then Matlab assumes you mea...

6 dagen ago | 1

Answered
How do i implement a gain of 10 inside my filter MAtlab?
See this: t = 1:30; x = rand(1, 30); % Some test data [b, a] = butter(3, 0.8); % A Butterworth filte...

6 dagen ago | 0

| accepted

Answered
Using Arrayfun for iterative plotting
For example: for iRow = 1:2 plot(Gen_Array{7,2}(:, iRow), Gen_Array{7,3}(:, iRow)); end I do not understand completely, wh...

6 dagen ago | 0

| accepted

Answered
Help with Multithreading!
If the data must be processed sequentially, you cannot run the task in a parallel way and therefor multi-threading will not help...

7 dagen ago | 0

Answered
Try catch on script for any error
nRetry = 8; for k = 1:nRetry try yourFunction(); break; % Exit from the loop on success catch ME ...

7 dagen ago | 1

| accepted

Answered
Why does my Command Window show different variables then my workspace?
So do I understand correctly: validateFolder() is a nested function. If you stop the debugger inside it, whos displays the varia...

7 dagen ago | 0

Answered
How to browse and open txt file with columns separated by comma and then plot specific columns of txt file in app designer?
"I want to make an app in matlab app designer" appdesigner (By the way: It was extremely hard to find this command. I've searc...

7 dagen ago | 0

Answered
First variable of table formatted differently for similar CSV inputs
Look in line 70 to 77 of 02.csv: ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, extraInfo,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, session,1,,,,,,,,,,...

7 dagen ago | 1

| accepted

Answered
Implement the following matrix
The code overwrites dif_x in each iteration. Maybe you want to collect the different matrices instead: theta = [ 45 46 48] ; t...

7 dagen ago | 1

| accepted

Answered
Help window doesn't appear
This is a problem in the preferences folder. See https://www.mathworks.com/matlabcentral/answers/453269-create-a-backup-of-your-...

7 dagen ago | 1

| accepted

Answered
Record plotting like an animation
Record it in which format? See https://www.mathworks.com/help/matlab/creating_plots/animation-techniques-1.html https://www.ma...

7 dagen ago | 0

Answered
How to remove the duplicate in the cell array but still keep the array structure?
A = {[3 11];[6 5 8];[ 11 5];[5]}; for iA = 1:numel(A) a = A{iA}; for jA = iA + 1:numel(A) A{jA} = A{jA}(~ism...

7 dagen ago | 1

| accepted

Load more