Home Forums SYSTEM How to use matlab component to run matlab code in optisystem

Viewing 1 reply thread
  • Author
    Posts
    • #67639
      Buki Ojed
      Participant

      I wrote a code in matlab and I am trying to run it on the matlab component. I saved the file name as salinity but when I included the filename “salinity” in the run command of the matlab component and added the matlab search path and ran the simulation, the error message is ” Undefined variable OutputPort1 or class OutputPort1.Channels”. I changed the run command of the matlab component to “OutputPort1= InputputPort1 and the simulation was successful. I want to run the command saved in the salinity file on the matlab component of the optisystem please how can I do it?

      Attachments:
    • #67659
      Ahmad Atieh
      Moderator

      Hello Buki,
      You need to make sure that you select correctly the signal type of the output port. There are four possibilities: optical, electrical, binary or M-ary. The signal type must match the signal you use in the Matlab code and input to the next component in OptiSystem.
      Regards,
      Ahmad

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