Answered

Change the sign of a Vector over N intervals

Use something like this: Y=rand(1,20); d=[1:4,8:12,17:20]; Y(d)=-Y(d)

Change the sign of a Vector over N intervals

Use something like this: Y=rand(1,20); d=[1:4,8:12,17:20]; Y(d)=-Y(d)

1 year ago | 0

Answered

For loop only outputting the final value.

Try using something like this: t=linspace(0,3*pi,100) t=linspace(0,3*pi,100); for k=1:length(t) y = q2(t(k)); val...

For loop only outputting the final value.

Try using something like this: t=linspace(0,3*pi,100) t=linspace(0,3*pi,100); for k=1:length(t) y = q2(t(k)); val...

1 year ago | 0

Answered

Plotting log x and y

Why don't you treat like this: n = 30; x = 0.5; h(1) = 1; emin = 1; for i =1:n if i==1 h(1)=0.5; else ...

Plotting log x and y

Why don't you treat like this: n = 30; x = 0.5; h(1) = 1; emin = 1; for i =1:n if i==1 h(1)=0.5; else ...

2 years ago | 0

Solved

Calculate the answer to life the universe and everything

<https://en.wikipedia.org/wiki/42_(number)>

2 years ago

Solved

Simpsons's rule (but not Homer Simpson)

I wonder what Homer Simpson would have thought of Simpson's rule? Somehow I doubt his thoughts would have included the phrase Ne...

2 years ago

Answered

How can i draw the graph of this two functions using matlab

when i have this like problem i use this code: t=linspace(0,2*pi,50); f=((t>0)&(t<=1)).*2+((t>1)&(t<=pi/2)).*0.5.*t.^2+((t>pi...

How can i draw the graph of this two functions using matlab

when i have this like problem i use this code: t=linspace(0,2*pi,50); f=((t>0)&(t<=1)).*2+((t>1)&(t<=pi/2)).*0.5.*t.^2+((t>pi...

2 years ago | 0

Answered

Finding the length of square function

t2=t(find(diff(X)>0)); t1=t(find(diff(X)<0)); long_time=t2(2)-t1(2)

Finding the length of square function

t2=t(find(diff(X)>0)); t1=t(find(diff(X)<0)); long_time=t2(2)-t1(2)

2 years ago | 0

Answered

How to create a sine wave with variable frequency - Simulink

something like this: (?) t=linspace(0,2*pi,100); f=rand(1,100); y=sin(f.*t); plot(t,y)

How to create a sine wave with variable frequency - Simulink

something like this: (?) t=linspace(0,2*pi,100); f=rand(1,100); y=sin(f.*t); plot(t,y)

2 years ago | 0

Answered

Euler method returning error

maybe you need copy the function eulsys.m in your system. In this link you have a copy: http://macs.citadel.edu/chenm/344.dir/0...

Euler method returning error

maybe you need copy the function eulsys.m in your system. In this link you have a copy: http://macs.citadel.edu/chenm/344.dir/0...

2 years ago | 0

Answered

how do i plot only certain part of cepstrum

KSSV ks suggests that you work with the index, here I show you an example of what KSSV mentions, x=linspace(0,10,100); y=x.^2;...

how do i plot only certain part of cepstrum

KSSV ks suggests that you work with the index, here I show you an example of what KSSV mentions, x=linspace(0,10,100); y=x.^2;...

2 years ago | 0

| accepted

Answered

creating multiple values of the same x,y,z

x=[ 2, 4, 2]; repmat(x,10,1)

creating multiple values of the same x,y,z

x=[ 2, 4, 2]; repmat(x,10,1)

2 years ago | 0

| accepted

Answered

no data plots on graph (plot (x,y))

David is correct. Why don't you try something like that in your code... d(1) = 32000; H = 8000; Re = 6370000; %c2 = 0.5*exp(...

no data plots on graph (plot (x,y))

David is correct. Why don't you try something like that in your code... d(1) = 32000; H = 8000; Re = 6370000; %c2 = 0.5*exp(...

2 years ago | 0

| accepted

Answered

Invalid syntax error with a simple code

tray this x = [-2 -1.5 -1 -0.5 0 0.5 1 1.5 2]; y = (x+x.*(sqrt(x+3))).*(1+2*(x.^(2)));

Invalid syntax error with a simple code

tray this x = [-2 -1.5 -1 -0.5 0 0.5 1 1.5 2]; y = (x+x.*(sqrt(x+3))).*(1+2*(x.^(2)));

2 years ago | 0

| accepted

Answered

How can I obtain slope of a trend line calculated for a time serie

Maybe this is useful for you https://www.mathworks.com/help/matlab/ref/detrend.html

How can I obtain slope of a trend line calculated for a time serie

Maybe this is useful for you https://www.mathworks.com/help/matlab/ref/detrend.html

2 years ago | 0