Community Profile

photo

SAHIL SAHOO


Last seen: 1 giorno ago Active since 2022

Statistics

  • Thankful Level 3

View badges

Content Feed

View by

Question


using "for loop" to solve 5 different coupled differential equation.
syms A(t) O(t) a = 0.6; n = 0.05; tc = 10E-9; r = 1.5; F = 1; N = 5; for i = 1:N ode1 = diff(A(i)) == (-1/(2*tc)).*(1 ...

6 giorni ago | 0 answers | 0

0

answers

Question


can I apply a for loop inside the function so that I can make my program short?
ti = 0; tf = 10E-6; tspan = [ti tf]; a = 0.6; n = 0.05; tc = 10E-9; r = 1.5; F = 10; f = @(t,y) [ ...

8 giorni ago | 1 answer | 0

1

answer

Question


what's the problem in defining the function in for loop?
clc ti = 0; %inital time tf = 70E-9;% final time tspan=[ti tf]; tp =1E-12; T = 2E3; p = 0.05; k = (0.62).*10^(4); c = ...

8 giorni ago | 1 answer | 0

1

answer

Question


there are two coupled differential equation, I try to solve that differential for the i = 1 to 5, but i think my for loop is incorrect.
these are the differential equation I want to solve where the i = 1 to 5 I want to solve these differential equation but mayb...

8 giorni ago | 1 answer | 0

1

answer

Question


what the time span do in ode45?
[time,Y] = ode45(f,tspan./tp,[sqrt(0.05);sqrt(0.05);0;0;0.1]); in this, is it means that we differentiaite the y by "t/tp" ?

16 giorni ago | 1 answer | 0

1

answer

Question


I want to solve this couple differential where the dot represent the derivative with respect to t/tp, where tp = 30E-9, is my code for solving this is correct? ?
T = 2E3 i made this code clc ti = 0; %inital time tf = 70E-9;% final time tspan=[ti tf]; T = 2000; p = 0.05; n = 1E...

17 giorni ago | 1 answer | 0

1

answer

Question


why this function is not plotting?
a =5; T = 2E3; Z = linspace(0,0.1,0.01); U = (1+2.*Z)./(2.*a.*T); plot(Z,U)

17 giorni ago | 1 answer | 0

1

answer

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

18 giorni 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...

18 giorni 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...

19 giorni 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; ...

19 giorni 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...

19 giorni 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...

19 giorni 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...

19 giorni 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...

20 giorni 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); ...

20 giorni 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...

22 giorni 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...

26 giorni 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...

27 giorni 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...

28 giorni 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)...

circa un mese 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...

circa un mese 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) ...

circa un mese ago | 0 answers | 0

0

answers

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

circa un mese 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...

circa un mese ago | 1 answer | 0

1

answer