A triangular wave is simply alternating lines with positive and negative slopes between upper and lower limits.Hello!
Kindly tell me that what is the code for generating a triangular waveform in matlab. . .?
i am new in matlab............
while(i=0; i<periods; i++){
while(j=lowerLimit; j<upperLimit; j++)
{
answerMatrix[length(answerMatrix) + 1] = upperLimit;
}
while(k=upperLimit; k>lowerLimit; k--)
{
answerMatrix[length(answerMatrix) + 1] = lowerLimit;
}
}