Community Profile

photo

Jan


11,865 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
Debug and Focus, Huh?
I'm using a tool under Windows, which let the focus follow the mouse: WizMouse. This is useful for scrolling in background windo...

5 hours ago | 1

Answered
xmlwrite - Control the order of attributes
It is the nature of XML files, that the order of the attributes do not matter. Therefore I expect, that there is no way to deter...

2 days ago | 0

Answered
Passing who function output as input
As mentioned already, this approach is extremely prone to bugs and unexpected behavior. As soon as someone calls a variable "tab...

2 days ago | 0

Answered
Recieving error Index exceeds the number of array elements (93) when attempting to useODE45?
There are a lot of severe problems in your code. One of them: function vp = Code1(t,v) ... k=max(size(t)); You call this as ...

2 days ago | 3

| accepted

Answered
How to display data from editext in listbox in GUI ?
UNTESTED!!! function yourGUI StrList = {'a', 'an', 'able', 'back', 'car', 'create'}; H.Fig = figure('Position', [100, 100, ...

2 days ago | 1

Answered
Capitalizing every word in a string
I like simple Matlab code: m = [false, isspace(str)]; m = m(1:length(str)); str(m) = upper(str(m)) By the way, tes...

3 days ago | 1

| accepted

Answered
How to use xlswrite with cell arrays in a loop?
for k = 1:10 Range = [char('a' + k - 1), '1'] xlswrite('Example.xls', AA{k,1}, 'Sheet1', Range) end The conversion t...

3 days ago | 1

| accepted

Answered
license erro -9,57
Does Walter's list solve your problem? https://www.mathworks.com/matlabcentral/answers/404028-license-error-cheat-sheet Most o...

3 days ago | 0

| accepted

Answered
Linkaxes causes change in current figure based on figure visibility. How to link the x axes without current figure changing?
Instead of setting the current figure by: set(0,'CurrentFigure',figs(2)) and relying on the hope, that the current fuigure is ...

3 days ago | 1

| accepted

Answered
"Warning: Unable to load Toolbox Path Cache" during parallelization
If the path cache is updated by multiple threads, it is likely, that one thread tries to read the file, while it is re-created b...

3 days ago | 0

| accepted

Answered
Direct form 2 iir filter
See https://www.mathworks.com/matlabcentral/answers/9900-use-filter-constants-to-hard-code-filter#answer_13623 for a Matlab func...

3 days ago | 0

| accepted

Answered
Why am I getting the following errors
This is strange: dS = @(t, x, s) (dSV(t,x) - x(2)*dV(t,x))/x(5); dP = @(t, x, p) (dPV(t,x) - x(3)*dV(t,x))/x(5); dG = @(t, x,...

3 days ago | 1

Answered
Global variable keeps initialising again and again when I want it to only initialise once.
Avoid globals. As you can see already, they confuse programmers and impede the debugging. Do not use globals. For tiny codes glo...

3 days ago | 1

| accepted

Answered
I would like help to plot a graph where on the x-axis are hour and minute data and on the y-axis are the temperature data
Fine. What is your question? If you have the dates as numerical datenum values, use datetick (link). For datetime objects, use ...

4 days ago | 0

Answered
1:2:10100:-25:0 gives 1, how?
See: Answers: Puzzling syntax: 2:4:8:10:12: 1:2:10100:-25:0 is correct Matlab syntax, but might be interpreted unexpectedly. It...

4 days ago | 5

| accepted

Answered
How can I build a menu like this?
If you create a popup menu in GUIDE, selecting a row will call the corresponding callback. Then you can start what ever you want...

4 days ago | 0

Answered
Pdist2 inside for
Why? pdist2 works directly with providing a [M1 x N] and a [M2 x N] matrix. So why do you want to write a loop and process one m...

4 days ago | 0

Answered
Index exceeds matrix dimensions.
See my answer to your former question: https://www.mathworks.com/matlabcentral/answers/439728-solving-a-system-of-ode-over-diffe...

4 days ago | 0

| accepted

Answered
Create n number of figures in MATLAB GUI.
The easiest way is not to use GUIDE or the AppDesigner, but to create the figures programmatically. See FEX: 41 GUI examples, fo...

4 days ago | 1

Answered
How to set the range of X axis equal to a column vector
ax2 = axes('Position',ax1_pos,... 'XAxisLocation','top',... 'XLim', [0.8, 1.35], ... 'XDir', 'reverse', ... ...

4 days ago | 0

| accepted

Answered
order 20 highest values of a pagerank vector
Use the 2nd output of maxk also: [M, index] = maxk(pagerank, 20) Result = x(index, :) I assume, you want maxk of the page...

4 days ago | 0

Answered
How can I write a parfor loop with nested variable?
The error message is clear: You use "x" as a variable and a function. Simply use different names. By the way: It is a very bad ...

4 days ago | 1

| accepted

Answered
How to read a specific row in a txt-file with variable row length?
"For a project I would like to read a certain row of the txt-file constant_file_matlab.txt" function S = ReadLineOfFile(FileNam...

4 days ago | 0

| accepted

Answered
matfile operating very slowly: how to improve performance?
You explain, that the use of the matfile command is slow, but the shown code does not contain this command at all. If you access...

4 days ago | 0

Answered
How to create a transparent, rectangular patch with rounded corners?
A rectangle object does not have XData and YData properties and it does not allow to set the transparency by Alpha blending. Thi...

4 days ago | 0

Answered
2D Random Walk Please Explain What These For Loops Are Doing
The question is not really clear. You can read in the documentation, what the for command does: doc for But maybe you ask for ...

4 days ago | 0

| accepted

Answered
How to draw horizontal line in my yaxis using my existing code
What exactly is "a (min,max) horizontal line from y axis"? The posted code does not help to understand, what you are asking for....

4 days ago | 0

Answered
How to find 3 unknows with Least square a*cosh(b*x)+c, not using toolbox?
You have a system of equations: a * cosh(b * x) + c - y = 0 with x and y are the given. Now you search the least-squares-solut...

4 days ago | 0

| accepted

Answered
How to solve Error using == ?
i = find(t > 0.1); M = max(v(i, 4)); iM = find(v(:, 4) == M); This fails if no t is greater than 0.1. Then i is empty and M...

5 days ago | 0

| accepted

Answered
Help me with imwrite
I guess boldly: b = reshape(b, size(a));

5 days ago | 0

| accepted

Load more