Home Forums FDTD Output Graph Plotting

Viewing 7 reply threads
  • Author
    Posts
    • #14307

      Hello All,

      I wanted to plot the output in some other software. There is an option to export data through the ‘print to bmp’ in the output layout. If i i export the data, it graph points come in notepad which are mixed with each other. So it becomes difficult to chose each point and plot them say in Matlab. Also if i have to plot two graph curves in one, how to do that.

      Thank you

    • #14316
      Damian Marek
      Participant

      Hi Subhashish,

      You can use the “importdata” command with Matlab to read in the .f2d files. Although it won’t be in the exact format, it will be imported as a data structure which can be easily manipulated.

      One column will be imported as double correctly, while the other will be imported as a cell array. Use “str2double” on the cell array and you will obtain the correct format.

      Cheers

    • #14318

      Sir,

      I imported the .f2d file in Matlab and theresult is as shown in the image attached below. I am not able to understand, from where to use the ‘str2double’ option as it is not being shown.
      Also please let me know, how to plot now the values of the two columns in Matlab.

      Thank you

      • #14323
        Damian Marek
        Participant

        Please reattach as a .png or .jpeg

    • #14324

      It is re-attached

    • #14326

      In PNG

      • #14339
        Damian Marek
        Participant

        Ah ok,

        You can import data that way with the Matlab interface. In that case I think it is as easy as dragging over a selection->right clicking->Import Selection. Then the data will be imported into your workspace. You can do the same with the next column. This is getting closer to Matlab software domain though, so you might want to try their online web pages and support. Look at manipulating data structures and the importdata command.

        The left column is your wavelength in um and the right column would be the DFT value, if that is what you exported.

        Regards

    • #14346

      Also Sir, Can i use Origin software also to import from Optifdtd.

      Thanks

      • #14352
        Damian Marek
        Participant

        I am not very familiar with Origin. I don’t believe you can automatically import f2d files. But after a quick check it seems like you can import from matlab. So indirectly it is possible!

        Regards

      • #15557
        perveen akhter
        Participant

        what I do is export data to .txt format, with export data and export display option. n then you can copy it to origin or anywhere. lil long step but works for me.

    • #15571

      I have plotted in matlab, now i will try in origin.

      Have you plotted in matlab Perveen ?

      • #17035
        perveen akhter
        Participant

        no, but you can definitely import it into matlab and plot it.

    • #17054

      ok, thanks..

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