回答済み
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...

7年以上 前 | 1

| 採用済み

回答済み
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...

7年以上 前 | 0

| 採用済み

回答済み
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 -...

7年以上 前 | 2

| 採用済み

回答済み
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...

7年以上 前 | 0

| 採用済み

回答済み
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);

7年以上 前 | 0

回答済み
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

7年以上 前 | 1

| 採用済み

回答済み
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...

7年以上 前 | 0

| 採用済み

送信済み


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

7年以上 前 | ダウンロード 2 件 |

0.0 / 5

回答済み
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 ...

7年以上 前 | 0

| 採用済み

回答済み
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=...

7年以上 前 | 0

| 採用済み

回答済み
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); ...

7年以上 前 | 1

回答済み
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...

7年以上 前 | 1

| 採用済み

回答済み
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)...

7年以上 前 | 1

| 採用済み

回答済み
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...

7年以上 前 | 0

回答済み
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...

7年以上 前 | 1

| 採用済み

回答済み
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 ...

7年以上 前 | 0

回答済み
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...

7年以上 前 | 0

| 採用済み

回答済み
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]...

7年以上 前 | 1

回答済み
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 ...

7年以上 前 | 0

| 採用済み

回答済み
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...

7年以上 前 | 0

回答済み
Does particleswarm solver exist in R2013a or not?
No, particleswarm was introduced in R2014b. Best regards Stephan

7年以上 前 | 0

| 採用済み

回答済み
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...

7年以上 前 | 0

| 採用済み

回答済み
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...

7年以上 前 | 0

| 採用済み

回答済み
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...

7年以上 前 | 1

| 採用済み

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

7年以上 前 | 1

| 採用済み

回答済み
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

7年以上 前 | 0

| 採用済み

回答済み
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...

7年以上 前 | 0

| 採用済み

回答済み
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 ...

7年以上 前 | 0

回答済み
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

7年以上 前 | 0

回答済み
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...

7年以上 前 | 0

| 採用済み

さらに読み込む