Answered
Matrix dimension must agree
w is size 1x501 not 1x500.

7 jours ago | 0

Answered
Finding Solution of an equation with hyperbolic functions within an interval
First draw a graph of the function to see roughly where the roots are, then use fzero: f = @(x) 2*cos(403*x).*sinh(403*x) + 2*...

7 jours ago | 0

| accepted

Answered
How to plot bifurcation with Delay Differential equations?
How about the following for your loop (it assumed you have defined tau earlier in the file): for j=1:N+1 if t(j)<=tau ...

7 jours ago | 0

| accepted

Answered
How to use Find (or any other function) to create an Array
Here's another possible way r = repmat((1:9)',1,5); max(r.*S_dash)

9 jours ago | 1

Answered
Euler's Method and Deflection of Cantilever Beam
Your derivative is incorrect for your specified deflection equation. I think your deflection equation is also not quite right....

9 jours ago | 0

| accepted

Answered
Runge Kutta 4 method to solve second order ODE
Your integration loop is mightily scrambled. It should be like this x(1) = x0; y(1) = y0; for i=1:length(t)-1 t(i+1) = i*...

9 jours ago | 0

Answered
ode45 with matrix 1st order ode
Does this help z = -1; %parameter Needs to be negative or T1 blows up. n = 2; T0 = eye(n,n); xspan = [0 5*pi]; opts = odes...

9 jours ago | 0

| accepted

Answered
How can i solve for the maximum? (a little complex)
Here is a brute force and ignorance method! % Maximise Value = (9/7)*Na + (5/4)*Nb + Nc + Nd % Subject to 7*Na + 4*Nb + 3*Nc ...

10 jours ago | 0

Answered
How to plot this?
How about ux = [1 0 -1 0 1]; uy = [0 1 0 -1 0]; % The order is CRU GPCC UDEL APH anticlockwise starting on positive x axis. ...

10 jours ago | 1

| accepted

Answered
Generate signals from trigonometric
More like this perhaps lambda= 1000; dz = 1; z = 0:dz:lambda; f = @(z) (z<lambda/2) - (z>lambda/2); n= 6; %[2 4 6 8 1...

10 jours ago | 0

Answered
Runga Kutta Mthod 4
As before, your value for h is too large. Set h = 0.01 and it works!

10 jours ago | 0

| accepted

Answered
If statement with multiple conditions
Don't forget the indices: if Tp(Tp_Idx)==4 if 30<=r0(r0_Idx)<75 SSGF(Tp_Idx,r0_idx)=(7.84.*10.^(...

11 jours ago | 0

Answered
How to solve simultaneously a system of ODEs containing both initial and boundary value problems
Your first two odes could be solved by ode15s, since they don't depend on y(3), then, having solved them, you could investigate ...

11 jours ago | 0

Answered
ode; zero input response; drawing the function in matlab
I think you should interpret (D+1)^2y as D^2y + 2Dy + y; i.e. d^2y/dt^2 + 2dy/dt + y Currently you have it as (dy/dt)^2 +2dy/dt...

11 jours ago | 0

| accepted

Answered
Trying to do central difference method
You should probably use the following to calculate the gradient Grad = (f(1+h) - f(1-h))/(2*h); though a much smaller value fo...

11 jours ago | 0

Answered
Dimension and line Error
It looks like you have some t's in your expression for Vy(i) that should be t(i).

11 jours ago | 0

| accepted

Answered
The function return value 'euler' might be unset. Es posible que el valor de retorno de la función 'euler' no esté establecido.
1 Probaby best to have f = euler(... rather than euler = f(... if you want to call the function euler. 2 You need to return yo...

11 jours ago | 0

Answered
How to use ode45 to plot this code?
You have mixed up doing your own iterations with allowing ode45 to do its iterations! For ode45, just use the following N=1000;...

11 jours ago | 1

Answered
Iterative method to find flowrate in pipe in series
Why would you assume the friction factor in the second pipe is the same as that in the first? You ony apply the head loss to th...

12 jours ago | 0

Answered
Writing a differential equation for iteration using for loop.
This is known as simple Euler integration. It arises from % dx/dt = (a - x^2 - y^2)*x - omega*y % Let dx/dt be approximat...

12 jours ago | 1

| accepted

Answered
Solve a system of three coupled first-order differential equations
According to the pdf equations, instead of dxdt(3)=(1/(alpha*a))*(1/x(3)-(1+lambda*sin(2*x(2)))*x(3)); you should have dxd...

12 jours ago | 1

| accepted

Answered
Gaussian distribution in Matlab
Try something like >> M = 1; D = 1; % Set your own values c = @(t,x) M/sqrt(4*pi*D*t)*exp(-x.^2/(4*D*t)); x = -5:0.1:5; t...

12 jours ago | 0

Answered
System of differential equation -empty sym
ode1=fiff(v)... should probably be ode1=diff(v)...

12 jours ago | 0

Answered
Problem with a function
I don't have your daily log returns vector, so I can't check your result. You are the only person who can decide if the function...

13 jours ago | 0

| accepted

Answered
Problem with a function
Try changing n=lenght(x); to n=length(x); (Notice the spelling).

13 jours ago | 0

Answered
rung kutta 4th order
Your integration loop isn't that of a fourth order RK routine. Presumably, -2 is standing in for -infinity here, so you correct...

13 jours ago | 0

| accepted

Answered
help using ODE45
The equations above are a little different from the ones in your initial code, but I've used them in the coding below m0=0.25 ;...

13 jours ago | 0

Answered
Plotting multiple points in graph
Here is one way x = 1:10; y = 1:10; [x, y] = meshgrid(x,y); plot(x,y,'k.')

13 jours ago | 0

| accepted

Answered
Runge Kutta method for coupled oscillator system.
Do you mean like this %initializing x,y,t h=0.1; %step size t=0:h:50; x1 = zeros(1,numel(t)); y1 = x1; x2 = x1; y2 = x1; ...

14 jours ago | 0

| accepted

Answered
Numerical integration using Simpsons
I just get 11 values for I3, running your code!

14 jours ago | 0

| accepted

Load more