Effacer les filtres
Effacer les filtres

How can I change a square wave into a sign wave with the graph provided?

2 vues (au cours des 30 derniers jours)
Nicholas le 19 Sep 2022
Im trying to turn this square graph into a sign wave. Any thoughts on how I would go about doing that? The graph provided is how it looks now but it needs to be more of a sign wave.
Here is the code Ive made so far:
frequency = 11.4;
phase = 50;
amplitude = 1;
Z = amplitude*sign(sin((2*3.1415*frequency.*X)+(phase)));
shading interp
colormap gray
axis off
axis square

Réponses (1)

Steve Eddins
Steve Eddins le 19 Sep 2022
Try removing the call to the sign function.


En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange



Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by