photo

SAHIL SAHOO


Last seen: 1 year ago Active since 2022

Followers: 0   Following: 0

Statistics

  • Thankful Level 4

View badges

Feeds

View by

Question


I'm having this error in code "Index in position 2 exceeds array bounds. Index must not exceed 20." can a nyone please explain how can I get rid of this?
clc clear ti = 0; tf = 7E-5; tp = 1E-9; tspan= [0:1E-7:7E-5]./tp; KC = 1; h = 1E-2; N = 20; y0 = zeros(3*N*N,1); for...

1 year ago | 1 answer | 0

1

answer

Question


How can I write y0 code in one line and still I can get this output.
y0= [ (1e-2)*rand(2,1); ((-3.14).*rand(1,1) + (3.14).*rand(1,1)); (1e-2)*rand(2,1); ((-3.14).*rand(1,1) + (3.14).*rand(1,...

1 year ago | 1 answer | 0

1

answer

Question


I couldn't match the index no., can anyone please help me to resolve this issue.
clc clear ti = 0; tf = 7E-5; tp = 1E-9; tspan= [0:1E-7:7E-5]./tp; KC = 1; h = 1E-2; h1 = 1; y0= [ (h)*rand(2,1); ((-3...

1 year ago | 1 answer | 0

1

answer

Question


why I'm not getting any output here and what should I do in my program?
clear clc lambda=1064*1E-9; k = 2*pi/lambda; Lx = 0.00864; screen_rad = Lx/2; pixel=Lx/1080; Xline=-screen_rad:pixe...

2 years ago | 1 answer | 0

1

answer

Question


How can I write this with a for loop?
r = (1/70).*( exp(i.*Y(:,3)) + exp(i.*Y(:,6)) + exp(i.*Y(:,9)) + exp(i.*Y(:,12)) + exp(i.*Y(:,15)) ... +exp(i.*Y(:,18)) +ex...

2 years ago | 2 answers | 0

2

answers

Question


How can I overcome from this problem? any another method to solve this.
ti = 0; tf = 70E-6; tspan=[ti tf]; y0= [(1e-2)*rand(2,1); ((-3.14).*rand(1,1) + (3.14).*rand(1,1)); (1e-2)*rand(2,1)...

2 years ago | 1 answer | 0

1

answer

Question


how can we decreases the length of the quiver? so that the tail get smaller but head shouldn't move.
X1 = [0.00246236309072327 0.00222132983511081 0.00176285733832268 0.00113182408271022 0.000390000000000000 -0.000389999999999999...

2 years ago | 1 answer | 0

1

answer

Question


How can I add quiver in this according to their color?
%I want to add the quiver in the circular array, means that a color show a %particluar direction.

2 years ago | 1 answer | 0

1

answer

Question


is there any one line code for writing in this way? if it's please give me a way to write this.
T = [ 0 0.0018 0 0.0012 0.0018 0 0.0025 0 0 0.0025 0 0.0015 0.0012 0 0.0015 0 ]

2 years ago | 1 answer | 0

1

answer

Question


I couldn't understand why this program took a long time to run, can anyone help me to solve the problem so that the code can run fast
ti = 0; tf = 70E-5; tspan=[ti tf]; KC = 1; h = 1E-2; for j = 1:500 y0= [ (h)*rand(2,1); ((-3.14).*rand(1,1) + (3.14).*...

2 years ago | 1 answer | 0

1

answer

Question


how can I write this in a compact form? can anyone suggest a single line code for it
yita_mn = [ 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1; 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; 0 1 0 1 0 0 0 0 0 0...

2 years ago | 4 answers | 0

4

answers

Question


how can I give arrow to a particular color in MATLAB?
I have this image I want to plot the arrow with the color bar, let suppose there is blue colour only so that denote this ...

2 years ago | 1 answer | 0

1

answer

Question


How can I resolve this issue here, can anyone please help.
% ti = 0; % tf = 70E-5; tp = 1E-9; tspan= [0:1E-8:7E-5]./tp; k = 1E-6; k1 = k.*(tspan); h = 1E-2; h1 = 1; y0= [(h)*rand(...

2 years ago | 1 answer | 0

1

answer

Question


I wrote this code but it takes a lot time to run even though it's not running.
clc; clear; ti = 0; tf = 70E-6; tspan=[ti tf]; k = 7E-6; h = 1E-2; for j = 1:100 y0= [(h)*rand(2,1); ((-3.14).*rand(...

2 years ago | 0 answers | 0

0

answers

Question


I want to plot 100 graph for T vs abs(r) for different initial condition and therefore I wrote this code, but it doesn't plotting any graph please help mem in this code.
ti = 0; tf = 1E-8; tspan=[ti tf]; KC = 2E-6; for j = 1:100 y0= [(1e-2)*rand(2,1); ((-3.14).*rand(1,1) + (3.14).*rand(1,1));...

2 years ago | 1 answer | 0

1

answer

Question


The Y(:,81) changes linearly with respect to T, I want to modify my code in such a way that when Y(:,81) reaches 2.5E-6 then after that it remains constant through out with T.
ti = 0; tf = 7E-12; tspan=[ti tf]; k = 1E-6; h = 1E-2; y0= [(h)*rand(2,1); ((-3.14).*rand(1,1) + (3.14).*rand(1,1)); ...

2 years ago | 1 answer | 0

1

answer

Question


how can I modify my code so that whenever my Y axis reaches 2.5E-6 it get constant, means no more variation with x axis.
ti = 0; tf = 7E-12; tspan=[ti tf]; k = 1E-6; h = 1E-2; y0= [(h)*rand(2,1); ((-3.14).*rand(1,1) + (3.14).*rand(1,1)); ...

2 years ago | 1 answer | 0

1

answer

Question


how can I plot in a such a way the x axis is in interval 10 10E2 10E3 10E4.
OrderParameter= [0.266 0.267 0.280 0.340]; Time = [10 1E2 1E3 1E4]; figure(1) plot(Time,OrderParameter,'linewidth',2) ylabel...

2 years ago | 1 answer | 0

1

answer

Question


I want to make the K as function of time but how can I do I have no idea, the K should evolve as Y evolve.
ti = 0; tf = 70E-8; tspan=[ti tf]; k = 1E-3; % I want to make this as the function of the time here, But how can I do % thi...

2 years ago | 0 answers | 0

0

answers

Question


I'm not getting any output here, can anyone please tell me what's the issue here?
h=0.01; time=0:h:1; a1(1)=rand(1,1); a2(1)=rand(1,1); g1(1)=rand(1,1); g2(1)=rand(1,1); o1(1)=((-3.14).*rand(1,1) + (3.14)...

2 years ago | 1 answer | 0

1

answer

Question


I couldn't understand the problem in this code.
ti = 0; tf = 70E-8; tspan=[ti tf]; k = (1E-3); KC = k; here I want to make the k and yita_mn time dependent. y0= [(1e-2)*r...

2 years ago | 2 answers | 0

2

answers

Question


how to add loop in this so that I can plot for 100 times and I will combine all in one plot.
ti = 0; tf = 70E-8; tspan=[ti tf]; KC = 1E-3; y0= [(1e-2)*rand(2,1); ((-3.14).*rand(1,1) + (3.14).*rand(1,1));       (1e-2)...

2 years ago | 1 answer | 0

1

answer

Question


I wrote a code to get the value of M less than 0.6, but How can I modify the code so that I can get the value of M which lie between 0.5 to 0.6 ?,
ti = 0; tf = 70E-8; tspan=[ti tf]; KC = 1E-3; for j = 1:100 y0= [(10e-2)*rand(2,1); ((-3.14).*rand(1,1) + (3.14).*rand(1,1)...

2 years ago | 1 answer | 0

1

answer

Question


how to display those value of M, which is only less than 1?
ti = 0; tf = 70E-8; tspan=[ti tf]; KC = 1E-4; for j = 1:100 y0= [(10e-2)*rand(2,1); ((-3.14).*rand(1,1) + (3.14).*rand(1,1)...

2 years ago | 1 answer | 0

1

answer

Question


I'm not getting the correct result for the u, i want it in degree but the ans is not right, the plot is not smooth.
ni = 1; nt = 1.5; t = 0:0.1:1.57; oi = rad2deg(t); u = asind((nt.*sin(oi))./ni); ot = abs(u); r1 = -(sind(oi-ot)./sind(oi+...

2 years ago | 3 answers | 0

3

answers

Question


how to rid of this warning and get correct solution?
ti = 0; tf = 1E-7; tspan=[ti tf]; k = 5E-3; h = 10E-2; y0= [(h)*rand(2,1); ((-3.14).*rand(1,1) + (3.14).*rand(1,1)); ...

2 years ago | 1 answer | 0

1

answer

Question


I'm adding legend in the graph for the 4 plot in the same graph, please help me in this.
ti = 0; tf = 1E-3; tspan=[ti tf]; y0 = [(10E-6).*rand(10,1);((-3.14).*rand(4,1) + (3.14).*rand(4,1))]; % intial conditions o...

2 years ago | 1 answer | 0

1

answer

Question


I gave the initial condition correctly still the program not working.
ti = 0; tf = 70E-8; tspan=[ti tf]; k = (0.62).*10^(-5); % y0= [(10e-6)*rand(2,1); ((-3.14).*rand(1,1) + (3.14).*rand(1,1)); ...

2 years ago | 2 answers | 0

2

answers

Question


i want to add a loop so that it works like this.
ti = 0; tf = 1E-3; tspan=[ti tf]; KC = 4E-3; y0= [ (10e-6)*rand(2,1); ((-3.14).*rand(1,1) + (3.14).*rand(1,1)); (10e-...

2 years ago | 1 answer | 0

1

answer

Question


how to mark a given point on the graph?
ti = 0; tf = 1E-3; tspan=[ti tf]; KC = 4E-3; y0= [ (10e-6)*rand(2,1); ((-3.14).*rand(1,1) + (3.14).*rand(1,1)); (10e-...

2 years ago | 0 answers | 0

0

answers

Load more