Question


the program is plotted once, then showing error, is something error in program
format long a = 0; b = 4; h = 0.1; k = 0.033; L = 0.5; s = 0.1; tc = 70E-9; n = (b-a)/h ; t = a + (0:n)*h; ...

2 years ago | 1 answer | 0

1

answer

Question


solving the equation using rk-4 method, but couldn't get the right output, last time I forget to add the program please check this one.
i want to solve this, where σ = 0.1, L0 = 0.5, k= 0.01, tc = 70E-9 format long a = 0; b = 4; h = 0.1; k = 0.01; % critic...

2 years ago | 0 answers | 0

0

answers

Question


solving a differential equation using ode45 but the problem is i didn't get what i expected.
i want to solve this, where σ = 0.1, L0 = 0.5, k= 0.01, tc = 70E-9 and U(Φ0) is so that the phase difference Φ0 vs t gr...

2 years ago | 1 answer | 0

1

answer

Question


is the "for loop" is wrong? what can be the solution?
clc ti = 0; tf = 100E-4; tspan=[ti tf]; o = 1E6; tc = 70E-9; tf = 240E-6; a1 = 0.02; a2 = 0.02; P1 = 1; P2 = 1; ...

2 years ago | 2 answers | 0

2

answers

Question


there is no output, it's keep running but no output, why so?
clc %defining constant ti = 0; %inital time tf = 100E-4;% final time tspan=[ti tf]; o = 1E6; % detuning frequency tc = 70...

2 years ago | 1 answer | 0

1

answer

Question


how to use for loop to get a value of y at different time?
syms y(t) k = 0.01; % critical coupling strength L = 0.5; sigma = 0.1; tc = 70E-9; eqn = diff(y,t) == (- ((sigma^2)*k/t...

2 years ago | 1 answer | 0

1

answer

Question


solving a single differential equation by using ode45, but it can't solve should I write something else.
clc ti = 0; %inital time tf = 10E-5;% final time tspan=[ti tf]; tc = 70E-9; %photon life time in cavity P = 1; %pump stre...

2 years ago | 1 answer | 0

1

answer

Question


how to solve integral in the defining the function command?
clc %defining constant ti = 0; %inital time tf = 10E-5;% final time tspan=[ti tf]; o = 10E6; % detuning frequency tc = 70...

2 years ago | 1 answer | 0

1

answer

Question


couldn't understand what's wrong in the function definition.
f = @(t,y) [ ((y(2)-a-l.*(abs(cos(y(3)+ pi/4)))).*y(1) + k.*y(1).*cos(y(3)- pi/2)).*(2/tc); ...

2 years ago | 2 answers | 0

2

answers

Question


I couldn't understand what's wrong in this.
%Unable to perform assignment because the left and right sides have a different number of elements. clc %defining consta...

2 years ago | 2 answers | 0

2

answers

Question


how can I use "for loop" in this to get a correct result?
clc %defining constant ti = 0; %inital time tf = 100E-4;% final time tspan=[ti tf]; o = 2E5; % detuning frequency tc = 30...

2 years ago | 1 answer | 0

1

answer

Question


I couldn't understand why this program is not working, is my all variable algorithm is correct?
clc ti = 0; tf = 10E-4; tspan=[ti tf]; y0=[9;9;1;1;0].*10E-2; I =0:0.1 :10 ; Vf = zeros(length(I),1) ; for i = 1:l...

2 years ago | 1 answer | 0

1

answer

Question


what the problem that I get to during plotting the graph
ti = 0; tf = 10E-4; tspan=[ti tf]; y0=[10;10;1;1;1].*10E-2; [T,Y]= ode45(@(t,y) rate_eq(t,y),tspan,y0); plot(T,Y(:,1)); xl...

2 years ago | 1 answer | 0

1

answer

Question


I want to need (maxY(:,1)) for different value of k, how the for loop will help?
I need the "max(Y(:,1))" for the different value of k, in this code I put a single constant value of k and I need the max(Y(:,1)...

2 years ago | 2 answers | 0

2

answers

Question


while solving a couple ordinary differential equation, I'm getting an error of Unable to perform assignment because the left and right sides have a different number of element
output:- Unable to perform assignment because the left and right sides have a different number of element. Error in laser2 (l...

2 years ago | 3 answers | 0

3

answers

Question


while solving coupled differential equation getting this problem.
"Unable to perform assignment because the left and right sides have a different number of elements. Error in laser2 (line 54) ...

2 years ago | 1 answer | 0

1

answer

Question


All I think is to get a sine wave function when plotting T vs A(1), but I didn't get any output. help me to modify this program
format long a = 0; b = 4; h = 0.1 V =1E-5 I1 = 0.2; I2 = 0.8; o = 3E5; tc = 30E-9; tf = 230E-6; a1 = 0.1; a2 =0.1; P...

2 years ago | 1 answer | 0

1

answer

Question


I tried to solve 6 couple differential equation, and getting an error which is " Index exceeds the number of array elements. Index must not exceed 2."
%how to remove this error " Index exceeds the number of array elements. Index must not exceed 2." close all; clc; format l...

2 years ago | 1 answer | 0

1

answer