1.025 total contributions since 2017

Knowledge means knowing where it is written...

Interested in:

- Optimization

- Mathematical Modelling

- Improvement of my programming skills

Answered

How to use GlobalSearch to find global minimum

Try the following: ver Its output should look somehow like this: >> ver ----------------------------------------------------...

How to use GlobalSearch to find global minimum

Try the following: ver Its output should look somehow like this: >> ver ----------------------------------------------------...

alrededor de 3 horas ago | 0

Answered

do anyone know how to put all iteration of a for loop into a matrix?

clear all clc a=0; b=8; n=2; run=input('Input your number of iteration:'); i=(1:run); integral_matrix = zeros(numel(i),1);...

do anyone know how to put all iteration of a for loop into a matrix?

clear all clc a=0; b=8; n=2; run=input('Input your number of iteration:'); i=(1:run); integral_matrix = zeros(numel(i),1);...

alrededor de 3 horas ago | 1

| accepted

Answered

Optimization with MATLAB solver's

Since we do not know what kind of problem you try to solve, all we can give is a general advice. If you follow the links you sho...

Optimization with MATLAB solver's

Since we do not know what kind of problem you try to solve, all we can give is a general advice. If you follow the links you sho...

alrededor de 4 horas ago | 0

Answered

Solving 2 ODE's with ode45

tfinal = 100; tspan = [0 tfinal]; winitial = [1 300]; [t,y] = ode45(@sub1,tspan,winitial) plot(t,y,'LineWidth',2) %%%...

Solving 2 ODE's with ode45

tfinal = 100; tspan = [0 tfinal]; winitial = [1 300]; [t,y] = ode45(@sub1,tspan,winitial) plot(t,y,'LineWidth',2) %%%...

alrededor de 12 horas ago | 0

Answered

Explicit root of symbolic equations

syms d1 d2 d3 d4 d5 d6 h11 h12 h13 h14 h21 h22 h23 h24 h41 h42... h45 h46 h51 h52 h55 h56 h61 h62 h65 h66 eq1 = h11*d1+h12...

Explicit root of symbolic equations

syms d1 d2 d3 d4 d5 d6 h11 h12 h13 h14 h21 h22 h23 h24 h41 h42... h45 h46 h51 h52 h55 h56 h61 h62 h65 h66 eq1 = h11*d1+h12...

1 día ago | 0

Answered

could anyone help me how to remove the zeros that comes after the number present after the decimal

Use format shortG: A = 12.3400 2.3400 >> format shortG >> A A = 12.34 2.34

could anyone help me how to remove the zeros that comes after the number present after the decimal

Use format shortG: A = 12.3400 2.3400 >> format shortG >> A A = 12.34 2.34

1 día ago | 1

Answered

Sum of near infinite series?

Think about your row. You can rewrite it - always two elements are the same as n^2/(n^2-1). With this knowledge read about <h...

Sum of near infinite series?

Think about your row. You can rewrite it - always two elements are the same as n^2/(n^2-1). With this knowledge read about <h...

1 día ago | 0

Answered

Max and Min of matlab function

f = @(r) (150.*(((1 + r).^36)-1) - 4500.*(r.*(1 + r).^36)); t = fplot(f,[0.0001 0.02]); high = max(t.YData) low = min(t.YDa...

Max and Min of matlab function

f = @(r) (150.*(((1 + r).^36)-1) - 4500.*(r.*(1 + r).^36)); t = fplot(f,[0.0001 0.02]); high = max(t.YData) low = min(t.YDa...

2 días ago | 0

| accepted

Answered

Babylonian algorithm - square root of a number

What is the problem - works for me: y = sqrtB([16 4 9]); function y=sqrtB(x) % It returns a row vector containing the...

Babylonian algorithm - square root of a number

What is the problem - works for me: y = sqrtB([16 4 9]); function y=sqrtB(x) % It returns a row vector containing the...

2 días ago | 1

| accepted

Answered

how do I create Matraix with same elements for several rows

turbines = [25,35,45,55,65]; how_often = 10; No_of_turbines = repmat(turbines,how_often,1) to get it ten times: No_of_turbin...

how do I create Matraix with same elements for several rows

turbines = [25,35,45,55,65]; how_often = 10; No_of_turbines = repmat(turbines,how_often,1) to get it ten times: No_of_turbin...

2 días ago | 0

| accepted

Answered

Save lines from a text file

It is a bad idea to store the lines all in different variables - this point has been discussed here for many times... Use a tabl...

Save lines from a text file

It is a bad idea to store the lines all in different variables - this point has been discussed here for many times... Use a tabl...

2 días ago | 1

| accepted

Answered

Failure in initial objective function evaluation. LSQNONLIN cannot continue.

The problem is that your DATA file is not complete - the sheet that should contain the data for N ist empty - therefore N is als...

Failure in initial objective function evaluation. LSQNONLIN cannot continue.

The problem is that your DATA file is not complete - the sheet that should contain the data for N ist empty - therefore N is als...

2 días ago | 0

| accepted

Answered

Delay differential equation of glucose insulin model

You should work through this example: https://de.mathworks.com/help/matlab/math/dde-with-constant-delays.html

Delay differential equation of glucose insulin model

You should work through this example: https://de.mathworks.com/help/matlab/math/dde-with-constant-delays.html

2 días ago | 0

Answered

how can i give output of a python file as input to a matlab matrix

Look here: https://de.mathworks.com/matlabcentral/answers/486354-read-a-matrix-from-a-text-file#answer_397428

how can i give output of a python file as input to a matlab matrix

Look here: https://de.mathworks.com/matlabcentral/answers/486354-read-a-matrix-from-a-text-file#answer_397428

2 días ago | 0

Answered

reading large text files into matrix

As already stated in the other question you asked with the same content, a possible way is: A = readcell('output1.txt'); B = s...

reading large text files into matrix

As already stated in the other question you asked with the same content, a possible way is: A = readcell('output1.txt'); B = s...

2 días ago | 0

Answered

read a matrix from a text file

A = readcell('output1.txt'); B = str2num(char(replace(split(string([A{:,1}]),']'),... {'00', '10', '01', '11', '['},{'0 0'...

read a matrix from a text file

A = readcell('output1.txt'); B = str2num(char(replace(split(string([A{:,1}]),']'),... {'00', '10', '01', '11', '['},{'0 0'...

2 días ago | 0

Answered

Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 3-by-3.

You could check: https://de.mathworks.com/matlabcentral/fileexchange/69896-linalgsubstitute I used this function to build the ...

Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 3-by-3.

You could check: https://de.mathworks.com/matlabcentral/fileexchange/69896-linalgsubstitute I used this function to build the ...

2 días ago | 0

Answered

Issuing a call to a function

This should help you, solving the problems: https://de.mathworks.com/help/matlab/matlab_prog/create-functions-in-files.html

Issuing a call to a function

This should help you, solving the problems: https://de.mathworks.com/help/matlab/matlab_prog/create-functions-in-files.html

2 días ago | 0

Answered

I face an error when apply bvp4c: Unable to solve the collocation equations -- a singular Jacobian encountered.

It appears to work by making 2 small changes in the code: init=bvpinit(linspace(0.001,0.9999,10),[0 0]); sol=bvp5c(@bvp_Q,@bvp...

I face an error when apply bvp4c: Unable to solve the collocation equations -- a singular Jacobian encountered.

It appears to work by making 2 small changes in the code: init=bvpinit(linspace(0.001,0.9999,10),[0 0]); sol=bvp5c(@bvp_Q,@bvp...

2 días ago | 1

Answered

How to filter a data

You can do this if there is a pattern: X = [0.081,0.082,0.089,0.091,0.095,0.098,0.13,0.15,0.18,0.21,0.25,0.31]; x = [X(1:3:end...

How to filter a data

You can do this if there is a pattern: X = [0.081,0.082,0.089,0.091,0.095,0.098,0.13,0.15,0.18,0.21,0.25,0.31]; x = [X(1:3:end...

2 días ago | 0

Answered

Hello guys can u help me to add vertical line on my probability density function, this is my code x=[-5:0.1:5]; a=normpdf(x,1,1); z=normpdf(x,3,2); plot(x,a,'b',x,z,'r') legend('normal signal','abnormal signal') ylabel('probability density function')

use <https://de.mathworks.com/help/matlab/ref/xline.html *|xline|*>: xline(1) for example.

Hello guys can u help me to add vertical line on my probability density function, this is my code x=[-5:0.1:5]; a=normpdf(x,1,1); z=normpdf(x,3,2); plot(x,a,'b',x,z,'r') legend('normal signal','abnormal signal') ylabel('probability density function')

use <https://de.mathworks.com/help/matlab/ref/xline.html *|xline|*>: xline(1) for example.

3 días ago | 0

Answered

Error: Error using load Unknown text on line number 1 of ASCII file cats.csv "Sex".

try <https://de.mathworks.com/help/matlab/ref/readtable.html |*readtable*|> instead.

Error: Error using load Unknown text on line number 1 of ASCII file cats.csv "Sex".

try <https://de.mathworks.com/help/matlab/ref/readtable.html |*readtable*|> instead.

3 días ago | 0

| accepted

Answered

Locate any decimal value inside a matrix?

Why use an ineffficient loop instead of vectorized inbuilt functions? Try: x=[1 2.5 4;5 3 3.2;4 9 2] idx = find(mod(x,1)~=...

Locate any decimal value inside a matrix?

Why use an ineffficient loop instead of vectorized inbuilt functions? Try: x=[1 2.5 4;5 3 3.2;4 9 2] idx = find(mod(x,1)~=...

3 días ago | 0

Answered

Extract column from matrix

Do this A2 = A(:,3) but note that you did not code the matrix as you wrote: >> A = [6 2 3; 9 3 5; 4 4 7] A = 6 ...

Extract column from matrix

Do this A2 = A(:,3) but note that you did not code the matrix as you wrote: >> A = [6 2 3; 9 3 5; 4 4 7] A = 6 ...

3 días ago | 0

Answered

what is the problem in this function ?

Use: result = fmin4(a,b,c) instead of pressing the RUN button

what is the problem in this function ?

Use: result = fmin4(a,b,c) instead of pressing the RUN button

3 días ago | 0

| accepted

Answered

problem in dealing Cell and array

% produce some data to play with r = 3; q = 4; k(1:5) = {rand(r,q)}; % size of k = 1 x 5 % This should do what you expect:...

problem in dealing Cell and array

% produce some data to play with r = 3; q = 4; k(1:5) = {rand(r,q)}; % size of k = 1 x 5 % This should do what you expect:...

3 días ago | 1

| accepted

Answered

I need help with this false position script

No idea what your problem is, code runs for me: format long fx=@(x)-12-(21*x)+(18*x^2)-(2.75*x^3) a =sprintf('%.8f', fp(f...

I need help with this false position script

No idea what your problem is, code runs for me: format long fx=@(x)-12-(21*x)+(18*x^2)-(2.75*x^3) a =sprintf('%.8f', fp(f...

4 días ago | 0

Answered

Run a script multiple times and save outputs

Write a function or a second script which calls your script in a for loop and save the results in a new line of a result matrix ...

Run a script multiple times and save outputs

Write a function or a second script which calls your script in a for loop and save the results in a new line of a result matrix ...

4 días ago | 0

| accepted