Matlab Script:
t=-5 : .01 : 4.99;
for i=1:length(t)
if t(i)>=0 && t(i)<=1
pt(i) = (5*sin((2*pi*10*t(i))+(pi/4)));
else
pt(i) = 0;
end
end
plot(t,pt);
how to put and plot this function in matlab with t=-5 : .01 : 4.99 ? pr(t)= { 5sin(2010t+5) otherwise pr(t)= { 5sin(2010t+5) otherwise
1. (a) Given function 0t2 x(t) = - - 0, otherwise plot function x(-^t + 2) plot function r+2) (b) For function plot function y[1 -2n].
how do i make this function and plot it in matlab?
p(t) 1.5 0.5 0.5 -1 2 2.5 3 3.5 4 4.55 0 05 5 22 Fig. 3: Training signal
Develop a MATLAB function that will compute the following function. Test your function for t = 7, 15, 25 and 100. Include your m file and the output of your tests in the word file. Plot this function in the range of t = 0 to 30. Include your plot with your submission. v(t)= 10t^2-5t 0<= t <=8 624-5t 8<= t <=16 36t + 12(t-16)^2 16<= t <=26 2136e^-0.1(t-26) t > 26 0 otherwise
To plot a figure of a function y=f(t) in an interval a and b in MATLAB, one should find n-1 points of t between a and b and then find the corresponding values to plot the figure. Below shows an example of a sin function in the range of 0 and 1 with 1000 increments, as well as the figure. >> t = 0:0.001:1; >> y = sin(2*pi*2*t); >> figure >> plot(t, y) 0 02 04 06 08 Demonstrate a...
write a matlab script for a generic ramp function r(t) then plot for y=ramp(t,3,0). The variable t is in the interval-5<t<5 and increments in steps of 0.01 function y = ramp(t,m,ad). %t= time support, m= ramp slope, ad = signal advance(positive)/delay(negative)
With matlab plot cos(0, 2pi*t) for values of t such that 3 periods of the function are shown Remember that Wo=0.4pi Someone specify the use of the radian frequency in their answer
Provide Matlab Code. with graph.
Q.4 Plot the following function f(t)- Plot f(2t-3).
How can I plot this function in MATLAB?? trap( -5, 5, 50) function area = trap(x0, xn, N) f=@(x) (6.*(exp(-x)).*(cos(x)).^2); h = ((xn-x0)/N); area=0; while (x0 area = area+(h/2)*(f(x0)+f(x0+h)); x0= x0+h; end fprintf('area of trap', area); end
Using MATLAB
4 8 Entire an equivalent function for the plot shown here using the step function, u(t)
4 8 Entire an equivalent function for the plot shown here using the step function, u(t)
Plot the following function on MATLAB h(t) = cos(pi*t/2) -2 <= t < -1 1 + t3 -1 <= t < 0 1 0 <= t < 1 1 + sin(2*pi*t) 1 <= t < 2 0 elsewhere