Community Profile

photo

Jan


Last seen: Today
12,866 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
Error using plot Vectors must be the same length.
Use the debugger to find the cause of the problem. Type in the command line: dbstop if error Run the code again. If it stops, ...

1 day ago | 0

Answered
ODE 45 Not enough input arguments
We cannot see it, because you have not posted the complete code. But this has been the reason in many other questions in this fo...

1 day ago | 0

Answered
How to delete empty rows in a cell array?
empty = cellfun('isempty', C); C(empty) = [];

1 day ago | 0

| accepted

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

6 days 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,...

7 days ago | 1

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

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

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

8 days ago | 0

| accepted

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

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

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

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

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

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

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

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

10 days ago | 0

Load more