Answered
Error in ODE15s
Reduce tspan to tspan = [0, 0.0023] and check the results. It seems, like the values implode such that the integration must fail...

5 years ago | 0

| accepted

Answered
how to use fsolve in for loop?
global R L3 L4 L5 R=80; L5=360; L4=360; L3=120; n=2; m=100*n; theta_r=linspace(0,2*pi*n,m); for b = 1:numel(t...

5 years ago | 0

| accepted

Answered
Need help with a loop and storing inputs in arrays
for i=1:1:numberOfFloors for i=1:1:numberOfSpacesOnEachFloor(space) These are two loops with the same counter. Use two dif...

5 years ago | 0

Answered
about product in uint64
With limiting the values to UINT64 range: x = uint64(2); d10 = uint64(10^(floor(log10(x)) + 1)); n = 2; a = x^n; li...

5 years ago | 0

Answered
How to use double loop in an equation?
The readers cannot guess, why you assume, that loops are required. Maybe this is sufficient already: theta = linspace(0, 180, 2...

5 years ago | 0

| accepted

Answered
How to calculate norm for multiple .csv in different folders?
norm() calculates a matrix norm, if you provide a matrix as input. so you get a scalar output. Maybe you want to use vecnorm in...

5 years ago | 0

Answered
Why vector created by colon have improper values
Welcme to the world of numerical maths. Your question belongs to the list of Most Frequently Asked Questions: https://www.math...

5 years ago | 1

| accepted

Answered
Iterate through subfolders and process txt files
Remember that the if command needs a scalar condition. c(:,1)>750 replies a logical vector. Therefore Matlab inserts an all() au...

5 years ago | 0

Answered
I want to extract the image without the axes
img = getframe(AxesHandle)

5 years ago | 0

Answered
Why there is error in reading a tiff image?
Possible reasons: You do not provide a CHAR or string as file name The specified file does not exist in the current folder Yo...

5 years ago | 0

Answered
visualization of huge matrix
Use imresize to interpolate the matrix to the size of real pixels on the screen. In the original plot it seems like the interpo...

5 years ago | 0

Answered
I have a new error I'm dealing with in my system of differential equations. What can I do here?
In the function to be integrated, the time is the 1st input and the variable the 2nd: % function dLdt = first_order (l, t, a, b...

5 years ago | 0

| accepted

Answered
size of axis numbers
Do you mean the tick labels? axes('FontSize', 24, 'NextPlot', 'add'); Without setting the NextPlot property, a plot() command ...

5 years ago | 1

Answered
Run system in background and print to command window when done
I'm not sure if this works: You can let a timer check if a process called by java.exec has beenfinished already: % [UNTESTED CO...

5 years ago | 0

Answered
How to get origin vector form indexd matrix
K = 6; A = randi([50 500], 1, K) idx = [1 3;4 5;2 6]; B = A(idx) C(idx) = B Of course, because if you omit the indire...

5 years ago | 0

| accepted

Answered
Why symsum does not provide the right result?
syms i n symsum(i,i, 1, n) If you define the sum without limits like in symsum(i,i) something different is calculated accordin...

5 years ago | 0

| accepted

Answered
How to export requirements to reqif with a script
If the searched function is implemented as M-function, you find the correspodning M-files using the profiler: profile on % ty...

5 years ago | 0

Answered
ode45 or bvp4c? Which one suits this scenario? Please anyone reply
If some conditions are defined at different time points, the problem is not an "initial value problem", which can be solved by O...

5 years ago | 1

| accepted

Answered
Multiplying unequal size matrices
There is no mathematically defined function for a multiplication of matrices with not matching sizes. Before you ask how to impl...

5 years ago | 1

Answered
how to make a function call with 2 variables of second degree
Converting a set of ODE functions of a higher degree works exactly the same for 1 or more variables. The procedure remains reall...

5 years ago | 0

| accepted

Answered
import .data file
Remember, that ".data" is a part of the file name, which can be choosen freely. It does not tell anything about the internal for...

5 years ago | 1

| accepted

Answered
ODE solution using Fourier series
syms x N = 3; for j=1:(2*N+1) xp(j) = simplify(-sym(pi) + (2*sym(pi)*(j-1))./(2.*N+1)); % Equidistance points end f...

5 years ago | 0

Answered
image processing write permission
If you specify a folder, in which you do not have write permissions, you cannot create a file there. If you omit a folder in the...

5 years ago | 0

| accepted

Answered
Finite difference method for second order ode
Matlab is case sensitive. There are no "Function", "For" and "Plot" commands. You should ge corresponding error messages. I try...

5 years ago | 0

| accepted

Answered
For loop doesn't run properly
tot_time = 0; for n = 2:8 while tot_time < 239.999 while load < 18 if d == n % When the depth is...

5 years ago | 0

| accepted

Answered
What does the value of I mean?
I is the value of images(i,j, whichChannel, im) as a double. So you have to find out, what images contains. How was this variabl...

5 years ago | 0

| accepted

Answered
If-condition: if number is +-5% of another
Are you sure, that this is correct: for x = 1:1:size(t{n}) if t{n}.sh(x) = ... Does t{n}.sh have as many elements as the ...

5 years ago | 0

| accepted

Answered
MATLAB Enter key is executing code
Do you mean the command window? You cannot change this. If a command is complete, it is executed when enter is pressed. The com...

5 years ago | 1

Answered
The efficient way (in terms of speed and consistency) for parsing a big text file with textscan
Str = fileread(FileName); C = strsplit(Str, '\n'); nPC = sum(strncmp(C, 'PC', 2)); nPG = sum(strncmp(C, 'PG', 2)); nPE = s...

5 years ago | 1

| accepted

Answered
Please, help! I get an NaN's cannot be converted to logicals. Error in Untitled (line 22) while tol_V2(i) && tol_V3(i) >= 0,00005; error. How can I fix it?
Before the loop, tol_V2 is a scalar. Inside the first iteration you set tol_V2(i) and tol_V3(i) with i == 1. But after increasin...

5 years ago | 1

| accepted

Load more