Home Forums SYSTEM Matlab code in matlab Component

Viewing 7 reply threads
  • Author
    Posts
    • #27184
      Rend Alrays
      Participant

      Hi..
      I’m having problems of writing codes in matlab and then exporting it to optisys ,, what are the difference between the code written in matlab and the other used in co-simulation,, as i saw in other topics the inputs will be written as (for example):
      amp = InputPort1.Sampled.Signal;
      freq = InputPort1.Sampled.Frequency;
      instead of numbers as in matlab ,, (I’m using an available code programmed in matlab)

    • #27187
      alistu
      Participant

      Hi Rend,

      The codes written for co-simulation have been made with regard to the format of the vectors generated in OptiSystem. For example, for an electrical signal OptiSystem creates a time vector and a magnitude vector separately. You must know how to refer to each of these vectors in your code to be able to access them and process their data by Matlab. A good first step to understand these is to start with the videos created by Optiwave and tutorials available in OptiSystem samples in Matlab co-simulation section.

      Regards

    • #27188
      Rend Alrays
      Participant

      thats exactly what i was talking about i didnt understand the codes written in the example below.. Are there any steps to follow ?
      according to the samples how can i run them if i dont have the m file? without writing the path??

      Attachments:
      • #27190
        alistu
        Participant

        You can write the code in an m file and put the m file in the same folder as the osd simulation file. This way you won’t have to writing the code path in the Run Command in the Matlab Component. You can also write the whole code in the run command, without any need to create any m file (although I have always used the first method).

    • #27192
      Rend Alrays
      Participant

      So how will I reach to the matlab code of the samples??

      • #27194
        alistu
        Participant

        You can refer to the following forum topic where the Matlab binary switch example code has been written in an m file. You just need to make a change to the m file as mentioned in the following comment by Damian:

        Why Matlab Binary Switch is not working?

        Regards

    • #27195
      Rend Alrays
      Participant

      I cant open the osd file 🙁

    • #27196
      Rend Alrays
      Participant

      Im using optisys 13

      Attachments:
      • #27202
        alistu
        Participant

        Can you find out the exact version you are using by choosing “about OptiSystem” option in help in the menu bar? The last OptiSystem version is 13.0.3 . You can see if yours is the same. If it was the same, try redownloading the file from the addressed forum topic and the open it. I hope it works.

    • #27205
      Rend Alrays
      Participant

      It is 13.0.1 and i have only 20 days left..

      • #27212
        alistu
        Participant

        Well, you can download the new version, uninstall the current version that you are using now and install the new version and you will still have 20 days left. I have done this in the past and I have also seen a verification of such a thing being possible in one of the topics as far as I can remember.

    • #27216
      Rend Alrays
      Participant

      How can I download the new version?? The problem still exists and I only have 20 days..

      • #27217
        alistu
        Participant

        You can go to your Optiwave profile and click on “evaluation license downloads”. there, you can use OptiSystem software and download it. You can download each software evaluation for three times. I suggest that you download the 64-bit version, as I know it is version 13.0.3, although 32-bit version is also supposed to be so.

Viewing 7 reply threads
  • You must be logged in to reply to this topic.