Community Profile

photo

Jan


Last seen: Today
12 863 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

  • Personal Best Downloads Level 4
  • Editor's Pick
  • First Review
  • 5-Star Galaxy Level 5
  • First Submission
  • 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
Two-body problem program gone wrong
Decrease the tolerance to reduce the truncation errors: opt = odeset('AbsTol', 1e-8, 'RelTol', 1e-8); [t,y]= ode45(odefun,tspa...

environ 4 heures ago | 1

| accepted

Answered
memory errors with large amounts of csv files
Extract the wanted value during the reading. There is no need to store the complete tables. grains = zeros(1, num_files); % Pr...

environ 4 heures ago | 0

| accepted

Answered
switch case & operators
This is not the purpose of SWITCH/CASE. Please read the documentationm again: doc switch SWITCH evaluates its argument, ibn yo...

2 jours ago | 1

Answered
How to add elements to the matrix with a certain pattern?
A = [1 2 3 4; 4 3 2 1; 5 2 3 1]; Ini = [2, 2]; Fin = [3, 4]; SumAllPaths(A, Ini, Fin); function S = SumAllPa...

2 jours ago | 0

Answered
Can anyone help me with my code?
ODE45 calls the function to be integrated with 2 inputs: the scalar time t and the vector x. Definming this function with 4 inp...

2 jours ago | 0

Answered
How to circ shift rows by different increments
What does "shift" mean? Circular shifting the elements? Adding a value to the contents of the elements? A = rand(100, 100); s ...

2 jours ago | 0

Answered
While loop inside another while loop
The code of my other questions spends the most time for updating the figure. Even closing the figure finally takes several secon...

3 jours ago | 0

Answered
Determine Type of noise in a signal?
This is not possible, if you only have the given information. The signal could be the sea-level at a specific location. If you ...

3 jours ago | 0

| accepted

Answered
Getting Error while starting up the Matlab on windows 10
"Filesystem error" sounds like the file system is damaged. This is not a problem of Matlab. Check the disk by CHKDSK and control...

3 jours ago | 0

Answered
Applying multiple constraints for while loop saving final output variables together
Your original code does not run, because the variable "i" is not defined initially. Maybe Matlab uses the default definition of ...

3 jours ago | 1

| accepted

Answered
Variable 'ep3' is undefined on some execution paths.
The message "undefined on some execution paths" means, that there is a possible combination of IF-branches, in which the variabl...

3 jours ago | 0

| accepted

Answered
I am interested to develop this numerical model, but i don't know how to start it ?
Start with defining your goal. How should the result look like? Is it enough to write some scripts without documentation, which ...

3 jours ago | 2

Answered
Best way to reduce to a simple loop?
The first block can be simplified to: i2 = 2; % This is 2 in the first iteration, and 1 afterwards index = NaN; for i1 ...

4 jours ago | 0

Answered
While loop inside another while loop
The main problem of your code is, that you increase m in the inner loop, but do not reset it to 1 inside the outer loop. So you ...

4 jours ago | 0

Answered
Can I call mex function in other mex functions
The easiest and most efficient solution would be to avoid the overhead of calling a MEX function, but to embed the needed code d...

4 jours ago | 0

| accepted

Answered
how to vectorise or speed up the specific code
ar = [0 0 0]; This creates a double array. ar = ar + single(AccelDouble); Here AccelDouble is converted to a single at first,...

5 jours ago | 0

Answered
How can i do it fast way ?
3 times faster: Replace index1 = find( (example{i, 1}(:, 2) >= var1 )==1); index2 = find( (example{i, ...

6 jours ago | 0

| accepted

Answered
What is the algorithm used by svd function?
In old versions Matlab has used the optimzed version of LAPACK:dgesvd http://www.netlib.org/lapack/explore-html/d1/d7e/group__d...

6 jours ago | 0

Answered
Removing the top rows of a csv file
Folder = 'D:\Your\Folder'; FileList = dir(fullfile(Folder, '*.csv')); for iFile = 1:numel(FileList) File = fullfile(Fo...

6 jours ago | 0

Answered
Load and store several .wav files within multiple subfolders
AudioArray = cell(1, numel(theFiles)); for k = 1 : numel(theFiles) % NUMEL is more direct than LENGTH baseFileName = th...

6 jours ago | 0

Answered
How to add two cells with strings together?
The message tells you, that A and B have different number of elements. Then a concatenation cannot work. If both have the same s...

6 jours ago | 1

Answered
How to reduce distance between two point of this curve ?
The trivial solution would be to reduce the numer of points: % th = linspace(pi/2, -pi/2, 100); ==> th = linspace(pi/2, -pi/2...

6 jours ago | 0

| accepted

Answered
Degree to radians conversion
Import the Excelfile by readtable . The conversion from degree to radians is easy, but in most cases not needed, because all tr...

6 jours ago | 0

Answered
Basic question about pointer in mex function
Q1. But I was wondering if z, y stores addresses not values how can we calculate like this z[i] = x * y[i]; ? This is a questio...

8 jours ago | 0

| accepted

Answered
Compare rows of a column vector
The screenshot show the contents of ex_vec. It does not matter how you have obtained it. All you want to know is how to find row...

8 jours ago | 0

Answered
Make a for loop for the following code
Naming a variable "went_from_to_probAge27" hides important information in the name. There this information can be accessed by re...

8 jours ago | 0

| accepted

Answered
removing for loop by using 3d matrix
What is your purpose of vectorizing the code? The processing time is dominated by imagesc and pause here. I assume the loop are ...

8 jours ago | 0

Answered
Why do I get a different result of calculation in for loop than in command line
Your analysis is correct: it seems unlogical. For an experiences programmer this is a secure signal, that something happens, whi...

8 jours ago | 0

Answered
Massive matrix, tridiagonal, ones()
A = [2 13 0 0 0 0; 1 2 13 0 0 0; 0 1 2 13 0 0; 0 0 1 2 13 0; 0 0 0 1 2 13]; d1 = diag(A, 0) % [2 2 ...

9 jours ago | 1

Answered
Problem with multiple inputs
for i=1:nargin nargin is the number of all inputs. For Untitled(a,varargin) thenumber of inputs is 1 larger than the size o...

9 jours ago | 1

| accepted

Load more