MATLAB: X(t) = 2*u((-t/4)+2), |t|<=10 matlab function I want to plot the above equation in matlab but i dont know how to plot please help or provide me code Best Answer I guess u is the unit-step function. You can try this if you have symbolic toolboxsyms tx = 2*heaviside(-t/4+2);fplot(x, [-10 10]);Without symbolic toolboxu = @(x) 1*(x>=0);t = -10:0.01:10;x = 2*u(-t/4+2);plot(t, x) Related SolutionsMATLAB: Find intersection point between u(t) = t^2(t-1) and u = 10. Simply use the function you calculated:>> t_sol = vpasolve(uSol == 10,t) ans = 2.5445115283879060011505370208062 - 0.77225576419395300057526851040312 + 1.8258281475484665736721861577551i - 0.77225576419395300057526851040312 - 1.8258281475484665736721861577551iI think you can withdraw the complex solutions and the result looks like in would work looking at the plot. Testing the solution: >> test_sol = uSol(t_sol(1)) test_sol = 10.0 MATLAB: How to sketch the following signal? x(t)= 3u(t-10)+ 4u(-t+3)-r(t+2)+4r(t)-2u(-t-2)-2r(t-3)-2u(t-4)+r(-t-5) syms u(t) r(t) x(t) t0u(t)=piecewise(t<t0, 0, t>=t0, 1);r(t)=piecewise(t<t0, 0, t>=t0, t-t0);t1=-6:0.01:10;x(t)=3*u(t-10)+4*u(-t+3)-r(t+2)+4*r(t)-2*u(-t-2)-2*r(t-3)-2*u(t-4)+r(-t-5);x=subs(x,{t0,t},{0,t1});plot(t1,x)Something like this should do it. Note that I defined the input range randomly. Hope this helps. Related QuestionThere is error in x1(t)How can I do this in mat labHow do integrate this function over t=0 to t=165Question about surf function
Best Answer