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

mehr als 7 Jahre vor | 1

| akzeptiert

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

mehr als 7 Jahre vor | 0

| akzeptiert

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

mehr als 7 Jahre vor | 2

| akzeptiert

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

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
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);

mehr als 7 Jahre vor | 0

Beantwortet
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

mehr als 7 Jahre vor | 1

| akzeptiert

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

mehr als 7 Jahre vor | 0

| akzeptiert

Gesendet


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

mehr als 7 Jahre vor | 2 Downloads |

0.0 / 5

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

mehr als 7 Jahre vor | 0

| akzeptiert

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

mehr als 7 Jahre vor | 0

| akzeptiert

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

mehr als 7 Jahre vor | 1

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

mehr als 7 Jahre vor | 1

| akzeptiert

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

mehr als 7 Jahre vor | 1

| akzeptiert

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

mehr als 7 Jahre vor | 0

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

mehr als 7 Jahre vor | 1

| akzeptiert

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

mehr als 7 Jahre vor | 0

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

mehr als 7 Jahre vor | 0

| akzeptiert

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

mehr als 7 Jahre vor | 1

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

mehr als 7 Jahre vor | 0

| akzeptiert

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

mehr als 7 Jahre vor | 0

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

mehr als 7 Jahre vor | 0

| akzeptiert

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

mehr als 7 Jahre vor | 0

| akzeptiert

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

mehr als 7 Jahre vor | 0

| akzeptiert

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

mehr als 7 Jahre vor | 1

| akzeptiert

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

mehr als 7 Jahre vor | 1

| akzeptiert

Beantwortet
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

mehr als 7 Jahre vor | 0

| akzeptiert

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

mehr als 7 Jahre vor | 0

| akzeptiert

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

mehr als 7 Jahre vor | 0

Beantwortet
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

mehr als 7 Jahre vor | 0

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

mehr als 7 Jahre vor | 0

| akzeptiert

Mehr laden