Respondida
How to call a function from another file?
Hi, change your function to: function x = mychaos(Initial_Value) x=Initial_Value; a=3.9; x=a*x*(1-x...

más de 7 años hace | 1

| aceptada

Respondida
Solving one equation with one unknown and get all possible solutions
Hi, getting all possible soultions is a hard job, because you have an infinite bunch of real solutions: You find them for e...

más de 7 años hace | 0

| aceptada

Respondida
Combining 2 matrices every other row
Hi, try: A = [-1; -3; -5; -7; -9] B = [2; 4; 6; 8; 10] result = reshape(([A B])',[],1) gives: A = -1 -3 -...

más de 7 años hace | 2

| aceptada

Respondida
convert matrix from hexadecimal to decimal
Hi, you could use hex2dec - depending on your input format / input data type this will work or not. I think this is why Jan ask...

más de 7 años hace | 0

| aceptada

Respondida
Problem with my code- trying to iterate through a matrix
i think this is correct: [x0]=rand_values(index,1); [y0]=rand_values(index,2);

más de 7 años hace | 0

Respondida
After solving and plotting a set of ODEs in 3d, how can I label a specific point (e.g (2,9,5))?
hold on scatter3(2,9,5, 'ro', 'lineWidth', 2, 'MarkerFaceColor', 'r') hold off

más de 7 años hace | 1

| aceptada

Respondida
Take lines from array
A = repmat([1 1 1 1; 2 2 2 2; 3 3 3 3; 4 4 4 4],16,1); % Example matrix B = zeros(32,4); % Preallocate B B(1:2:end) = A(1:4:en...

más de 7 años hace | 0

| aceptada

Enviada


linalgSubstitute
Replace parts of matrices by other matrices starting at given row and column

más de 7 años hace | 2 descargas |

0.0 / 5

Respondida
How to write to make a computation grid with random numbers?
Hi, if your function that uses the randomized values is vectorized, you can use this code: x = -9:0.2:9; y = -8:0.2:8; id_x ...

más de 7 años hace | 0

| aceptada

Respondida
Plotting error: I am trying to plot the equations and the output should be as shown but its not
Hi, try: % Constants beta=5; alfa = 2.*beta/(beta+1); tau1=2; tau2=2.4; gamma=alfa.*(2-exp(-tau1)); % Time frames t1=...

más de 7 años hace | 0

| aceptada

Respondida
What's function does replace LINALG::SUBSTITUTE (A,B,m,n)?
Hi, you can use this function: function result = linalg_substitute(A,B,m,n) [mA, nA] = size(A); [mB, nB] = size(B); ...

más de 7 años hace | 1

Respondida
Bar in different colors for histfit
Hi, see the section "control individual bar colors" in the documentation: https://de.mathworks.com/help/matlab/ref/bar.html#d1...

más de 7 años hace | 1

| aceptada

Respondida
Solving equation with bessel function
Hi, define the area you are interested in and loop through: syms x eqn = besselj(0,0.5*x)*bessely(0,4.5*x) - besselj(0,4.5*x)...

más de 7 años hace | 1

| aceptada

Respondida
Plot instantaneous speed of the vehicle
Hi, the definition of speed is: v=ds/dt How do you want to calculate speed if you only have information about ds, but without...

más de 7 años hace | 0

Respondida
Ode45 I get wrong results.
Hi, ode45 integrates your second order ode two times. So the result of ode45 will be angle and velocity over time. To get acce...

más de 7 años hace | 1

| aceptada

Respondida
how to detect empty rows and columns from 3-D matrix and crop them?
Hi, two lines of code do the job: Frames = zeros(5,5,10); Frames(:,:,1 ) = [0 0 90 0 0; 0 0 90 0 0; 90 90 90 0 0;0 0 0 0 0;0 ...

más de 7 años hace | 0

Respondida
How to solve this equations?
Hi, as Madhan already said in his comment, we need to see some code to help. Otherwise we would do your work, what is not the w...

más de 7 años hace | 0

| aceptada

Respondida
I don't understand what is going wrong with my code!!, I get error of a matrix singular
Hi, you do a divide by zero at the initial point - use another x0 for y(1) - for example try: [t,y]=ode45(@rocketequat,[0 160]...

más de 7 años hace | 1

Respondida
Genetic algorithm problem in matrix index
Hi, you are using the simple_fitness function, which is an implementation of the Rosenbrock function. This function is a built ...

más de 7 años hace | 0

| aceptada

Respondida
i Checked calculation and found The solution does not accord with the equation
Hi, this version works fine for me: fun = @root2d; x0 = [1,1,1,1,1,1]; x = fsolve(fun,x0) result = fun(x) function F = r...

más de 7 años hace | 0

Respondida
Does particleswarm solver exist in R2013a or not?
No, particleswarm was introduced in R2014b. Best regards Stephan

más de 7 años hace | 0

| aceptada

Respondida
Area between two points and a curve
Hi, the whole area of your figure is a rectangle with area: (3-1)*(0-(-0.5). If you calculate the integral of your curve in th...

más de 7 años hace | 0

| aceptada

Respondida
Add some months into a Column of Single Years
Hi, you can use this function: function result = years_with_months(start_year, end_year) % Build years years = start_year:en...

más de 7 años hace | 0

| aceptada

Respondida
Variation of initial values and slope calculation
Hi, it appears that there are at least 2 problems in your code. Due to this (and the fact that i do have to understand fully ho...

más de 7 años hace | 1

| aceptada

Respondida
Number of ACF lags must be a scalar
Hi, try: Table=readtable('rGDP.csv'); gdpacf = autocorr(Table.GDP,10); Best regards Stephan

más de 7 años hace | 1

| aceptada

Respondida
Why doesn't symprod recognize indexed variables?
Hi, try: syms k(n) symprod(k(n),n,1,4) this should give you the expected result. Best regards Stephan

más de 7 años hace | 0

| aceptada

Respondida
Why can't I set populationsize of GA to vector?
Hi, have a read here, it is directly linked from the section of the documentation that is quoted in your question. I think this...

más de 7 años hace | 0

| aceptada

Respondida
Minimum least square fitting with multiple variable
Hi, you could use the resnorm to compare the quality of different approaches: [x, resnorm] = lsqnonlin(...) But the question ...

más de 7 años hace | 0

Respondida
How to use ga in matlab as a binary genetic algorithm?
Hi, use IntCon and set lower and upper bounds to zero respectively ones. Best regards Stephan

más de 7 años hace | 0

Respondida
How can I turn off the automatic plotting when using bayesopt
Hi, see this link to change the behavior of plot. For your purpose: 'PlotFcn', [] should work. See also the Verbose option t...

más de 7 años hace | 0

| aceptada

Cargar más