Home Forums SYSTEM Regarding MATLAB component

Viewing 1 reply thread
  • Author
    Posts
    • #84981
      Sivarajan R
      Participant

      I have use the MATLAB code to design a block. In that I used if else statement and it throws an error of “Atleast one end is missing” even though thr syntax is correct.

      OutputPort1 = ImputPort1
      a = sum(abs(InputPort1.Sampled.Signal))^2);
      if (a==0)
      OutputPort1.Sampled.Signal = OutputPort1.Sampled.Signal;
      else
      OutputPort1.Sampled.Signal = OutputPort1.Sampled.Signal/a;
      end

      Anyone can tell why this error occur.

    • #85007
      Ahmad Atieh
      Moderator

      Dear Sivarajan,
      it looks the issue is in the statement: OutputPort1 = ImputPort1. You need to use “n” instead of “m”.
      regards,
      Ahmad

Viewing 1 reply thread
  • You must be logged in to reply to this topic.