Réponse apportée
Matrix dimension must agree
w is size 1x501 not 1x500.

plus de 5 ans il y a | 0

Réponse apportée
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*...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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)

plus de 5 ans il y a | 1

Réponse apportée
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....

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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*...

plus de 5 ans il y a | 0

Réponse apportée
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...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 5 ans il y a | 0

Réponse apportée
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. ...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 0

Réponse apportée
Runga Kutta Mthod 4
As before, your value for h is too large. Set h = 0.01 and it works!

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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.^(...

plus de 5 ans il y a | 0

Réponse apportée
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 ...

plus de 5 ans il y a | 0

Réponse apportée
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...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 0

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

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 0

Réponse apportée
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;...

plus de 5 ans il y a | 1

Réponse apportée
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...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 0

Réponse apportée
System of differential equation -empty sym
ode1=fiff(v)... should probably be ode1=diff(v)...

plus de 5 ans il y a | 0

Réponse apportée
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...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Problem with a function
Try changing n=lenght(x); to n=length(x); (Notice the spelling).

plus de 5 ans il y a | 0

Réponse apportée
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...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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 ;...

plus de 5 ans il y a | 0

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

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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; ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Numerical integration using Simpsons
I just get 11 values for I3, running your code!

plus de 5 ans il y a | 0

| A accepté

Charger plus