Im trying to create a sawtooth wave but the code i have gives me a square wave. Not sure what i need to change, maybe my values for ap and bp? Sorry im not very good at matlab. Thanks in advance.
T=input('what is the period');
p=input('how many coefficients');
bp=sin(80)/320 - cos(80)/4;
ap=sin(80)/4 - sin(40)^2/160;