title: I get error with my 8psk modulation code
body: <p>I'am trying to code a 8PSK modulation system,this is the code:</p>
  
  <pre><code>custMap = [0 2 4 6 7 5 3 1];
  hChan = comm.AWGNChannel('BitsPerSymbol',log2(8));
  hErr = comm.ErrorRate;
  % Initialize the simulation vectors. The Eb/No is varied from 0 to 10 dB in
  % 1 dB steps.
  ebnoVec = 0:10;
  for k = 1:length(ebnoVec)
        % Set the channel Eb/No
        hChan.EbNo = ebnoVec(k);
        while errVec(2) &lt; 200 &amp;&amp; errVec(3) &lt; 1e7
            % Generate a 1000-symbol frame
            data = randi([0 1],4000,1);
            modData = step(hMod,data);
            % Pass the modulated data through the AWGN channel
            rxSig = step(hChan,modData);
            % Demodulate the received signal
            rxData = step(hDemod,rxSig);
        end
  
    end
  </code></pre>
  
  <p>but I have a problem at this line:</p>
  
  <pre><code>modData = step(hMod,data);
  </code></pre>
  
  <p>this is the error:
  <img src="https://i.stack.imgur.com/f1BLk.png" alt="enter image description here">
  how can I solve the problem please and thanks for any Help</p>