- #1

- 169

- 0

## Homework Statement

Create 512 element triangular waveform (In Matlab)

x(k)= k 0≤k≤7

8-k 8≤k≤23

-32+k 24≤k≤31

For 0≤k≤31

repeating every 32 elements.

## Homework Equations

N/A

## The Attempt at a Solution

Ok so im confused on how to code this.

This is what I have so far.

k1=0:7;

k2=8:23;

k3=8-k2;

k4=24:31;

k5=-32+k4;

K=[k1,k3,k5];

Im not sure if this is the best way though. Or if this is correct.

How do I get it to repeat every 32 elements?

Thanks for any assistance!