Convert graph figure to equation
12 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
collegestudent
el 20 de En. de 2023
Comentada: Torsten
el 20 de En. de 2023
I am trying to write the equation of the graph and plot it. ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1269870/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1269870/image.jpeg)
So far I have written this equation, however when I plot it, there is a point at (-3,-3) and I am not sure why. I need to plot it as a continuous time signal.
n = -6:6;
x = @(n) n.*((n>-4)&(n<=-2))+4*(n==-2)+(-2)*(n==2)+0*(n==4);
plot(n,x(n));
1 comentario
Adam Danz
el 20 de En. de 2023
@collegestudent I edited your question to run your code so that it produces the plot.
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!