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

5 years ago | 0

| accepted

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

5 years ago | 0

| accepted

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

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

5 years ago | 3

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

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

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

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

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

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

5 years ago | 1

| accepted

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

5 years ago | 1

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

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

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

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

5 years 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 years 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 years 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 years 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 years 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 years 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 years ago | 1

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

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

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

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

5 years ago | 2

| accepted

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

5 years ago | 0

Answered
An late update during a year includes all previous updates of this year?
The updates are cummulative: Update 5 includes the 4 previous updates also.

5 years ago | 0

| accepted

Answered
Matrix subtraction makes the model too slow
No. This is an elementary operation. As long as Data has been pre-allocated properly, this cannot be accelerated or omitted. If...

5 years ago | 0

Answered
How to loop over datafiles using the sprintf function?
This is valid Matlab code, but it does not do, what you expect: for i = 1:23, ii = 1:2 This is 1 loop only. ii is set to the v...

5 years ago | 1

Load more