Community Profile

photo

Jan


Last seen: Today
13 445 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

  • Explorer
  • 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
Random line segments confined in a box
figure; axes('XLim', [-0.1, 1.1], 'YLim', [-0.1, 1.1]); nLine = 100; Coor = [0, 1, 1, 0, 0; ... 0, 0, 1, 1, 0]; for...

ungefär 7 timmar ago | 1

Answered
while loop in matlab
What's wrong with while true in Matlab?

ungefär 8 timmar ago | 1

Answered
How to save data from edit text using a push button in a GUI?
"With a pushbutton I want to close the GUI and save all the data from the edit boxes." Closing is easy: close(handle.figure1) ...

ungefär 8 timmar ago | 0

Answered
readtable interpretes time hh:mm:ss:SSS in different ways
I do not understand the meaning of your file operations. As far as I understand, the problem can be reproduced by: RA = readtab...

ungefär 9 timmar ago | 0

Answered
While loops in ode45
You do not reset erro to inf after the first iteration. Then all following iterations are not entered. Replace: erro = inf; ....

ungefär 10 timmar ago | 0

Answered
Coupled differential equation using ODE 45
Yes, of course the values are 0. The initial value of y(1) is 0. The derivative of y(1) is: dwp0dz = ((s * alpha0 * y(1) * x0)...

ungefär 13 timmar ago | 1

| accepted

Answered
How can I make sphere using smaller spheres?
r = 0.1; R = 1; [x, y, z] = sphere(12); w = linspace(-R + r, R - r, 1 + R / r); figure; axes('NextPlot', 'add', 'XLim', [-R...

ungefär 13 timmar ago | 2

| accepted

Answered
How to assign a row matrix to another row matrix
The error message suggests: To convert to numeric, use the TABLE2ARRAY function Did you try this already? In one line you w...

ungefär 19 timmar ago | 0

Answered
Insert an input to an exe automatically by Command Window
You could use this to inject keystrokes: https://www.mathworks.com/matlabcentral/fileexchange/40001-keyinject The function must...

ungefär 19 timmar ago | 1

| accepted

Answered
ODE45 function time step
Avoid using global variables, because they are a shot in your knee. Use a persistent variable instead and reply it to the calle...

ungefär 19 timmar ago | 0

Answered
Repeating while loop until the conditions are met
It is not getting clear to me, what you are asking for. So some hints at first: Pi=0; sumPi=0; P=zeros(n,1); for j=1:n ...

ungefär 22 timmar ago | 0

Answered
Turn off "Improve MATLAB by sending user experience" from the command line
What about setting this parameter through the GUI and comparing C:\Users\<USER>\AppData\Roaming\MathWorks\MATLAB\<VErSION>\mat...

ungefär 23 timmar ago | 0

Answered
How to create an array from a GUI where the array length changes by user's input?
The easiest way is to omit step 1, but to let the use create as many values as wanted and count them afterwards. There is a nice...

en dag ago | 1

| accepted

Answered
How to Count occurrences?
t = 'tagtacagccagtagagttgattccaaggaagtccggctgttgtagagtagc'; tag = 'tag'; result = sum(strfind(lower(t), lower(tag)))

en dag ago | 1

Answered
several plot - subplot for-loop
Maybe: ... subplot(1, length(Files), k); yyaxis left plot(p,ODsatpercent,'bo--'); yyaxis right pl...

en dag ago | 1

Answered
How to doI plot F(x) = [1 -(10/x)]/[1-(100/x^2)] for X ranging from 100 to 1100 at an interval of 50?
x = 100:50:1100; plot(x, (1 - (10 ./ x)) ./ (1 - (100 ./ x.^2))); With some basic maths skills, a simplification is easy: plo...

en dag ago | 2

Answered
How to change output in FOR Loop
Creating variables dynamically has a lot of severe disadvantaged. Using a struct is nicer, safer and more efficient. X = {'JanL...

2 dagar ago | 0

Answered
Mis-type append problem
The problem is, that you provide CHAR vectors, but scatter requires numerical arrays. readtable would be smart, but this works ...

2 dagar ago | 0

Answered
Error using ode45
The error message means, that you need a function, because the integrator uses input and output arguments for the function to be...

5 dagar ago | 0

| accepted

Answered
How to solve this ODE system which involves these integrals?
What about using two further variables? function dx = fcn(z, x) dx = [f1(x(1), x(2)) / x(3); ... f2(x(1), x(2)) / x(4);...

5 dagar ago | 0

| accepted

Answered
Read a txt file
Never let a code continue if an error occurs. In larger codes with a lot of output messages will be overseen. Stop with an error...

5 dagar ago | 0

Answered
'Storing' variables in RAM
Store the wanted data persistently: function Out = DataVault(Cmd, Name, Data) persistent Stored mlock; switch lower(Cmd) ...

5 dagar ago | 0

| accepted

Answered
Get all used variable names from a script
It is hard to parse the code exhaustively for names of variables: Mask strings and char's. This is not trivial: '"asd"', '"asd...

5 dagar ago | 2

Answered
Why is MATLAB using my network?
When I'm not signed in in my local Matlab session (see the "Sign in" button in the top right corner), Matlab opens several inter...

5 dagar ago | 0

Answered
How to compare two numbers in two different vectors and save without using for loop?
The implementation of isalmost is not efficient. It is faster to check the values directly: nodeMat = zeros(size(mainNodes,1),3...

5 dagar ago | 0

| accepted

Answered
Any Matlab Tutors ?
Read the Getting Started chapters of the documentation and Matlab's Onramp. For details feel free to ask here in the forum. The ...

6 dagar ago | 0

Answered
function in matlap#
The actual problem is trivial: All you have to do is to multiply the input by a scalar. Your problem is most likely (you didn't...

6 dagar ago | 0

Answered
How to solve ODE system numerically
a1 = 0.7; a2 = 0.4; b1 = 0.06; b2 = 0.08; c1 = 8787168; c2 = 8111232; y0 = [15000, 17000]; tSpan = [0, 0.0001]; % The va...

6 dagar ago | 1

| accepted

Answered
How to download Matlab 2018a?
You find the link in your Account page, if you have a license: https://www.mathworks.com/downloads/web_downloads/select_release...

6 dagar ago | 0

Answered
How to convert cell array to float array?
% If the input is a cell containing the chars '0' and '1': B = cell2mat(YourCell); Value = B(:, 1) - '0' + bin2dec(B(:, 2:11))...

6 dagar ago | 0

Load more