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

mehr als 5 Jahre vor | 0

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

mehr als 5 Jahre vor | 0

| akzeptiert

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

mehr als 5 Jahre vor | 0

| akzeptiert

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

mehr als 5 Jahre vor | 1

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

mehr als 5 Jahre vor | 0

| akzeptiert

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

mehr als 5 Jahre vor | 0

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

mehr als 5 Jahre vor | 0

| akzeptiert

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

mehr als 5 Jahre vor | 0

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

mehr als 5 Jahre vor | 1

| akzeptiert

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

mehr als 5 Jahre vor | 0

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

mehr als 5 Jahre vor | 0

| akzeptiert

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

mehr als 5 Jahre vor | 0

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

mehr als 5 Jahre vor | 0

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

mehr als 5 Jahre vor | 0

| akzeptiert

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

mehr als 5 Jahre vor | 0

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

mehr als 5 Jahre vor | 0

| akzeptiert

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

mehr als 5 Jahre vor | 0

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

mehr als 5 Jahre vor | 1

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

mehr als 5 Jahre vor | 0

| akzeptiert

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

mehr als 5 Jahre vor | 1

| akzeptiert

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

mehr als 5 Jahre vor | 1

| akzeptiert

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

mehr als 5 Jahre vor | 0

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

mehr als 5 Jahre vor | 0

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

mehr als 5 Jahre vor | 0

| akzeptiert

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

mehr als 5 Jahre vor | 0

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

mehr als 5 Jahre vor | 0

| akzeptiert

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

mehr als 5 Jahre vor | 0

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

mehr als 5 Jahre vor | 0

| akzeptiert

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

mehr als 5 Jahre vor | 0

| akzeptiert

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

mehr als 5 Jahre vor | 0

| akzeptiert

Mehr laden