- This topic has 12 replies, 3 voices, and was last updated 9 years, 11 months ago by Dr. Subhashish Tiwari.
-
AuthorPosts
-
-
October 17, 2014 at 4:58 am #14307Dr. Subhashish TiwariParticipant
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
-
October 17, 2014 at 10:10 am #14316Damian MarekParticipant
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
-
October 17, 2014 at 10:44 am #14318Dr. Subhashish TiwariParticipant
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
-
October 17, 2014 at 11:01 am #14323Damian MarekParticipant
Please reattach as a .png or .jpeg
-
-
October 17, 2014 at 11:03 am #14324Dr. Subhashish TiwariParticipant
It is re-attached
-
October 17, 2014 at 11:04 am #14326Dr. Subhashish TiwariParticipant
In PNG
-
October 17, 2014 at 11:29 am #14339Damian MarekParticipant
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
-
-
October 17, 2014 at 2:13 pm #14346Dr. Subhashish TiwariParticipant
Also Sir, Can i use Origin software also to import from Optifdtd.
Thanks
-
October 17, 2014 at 5:14 pm #14352Damian MarekParticipant
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
-
November 13, 2014 at 6:53 pm #15557perveen akhterParticipant
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.
-
-
November 13, 2014 at 10:42 pm #15571Dr. Subhashish TiwariParticipant
I have plotted in matlab, now i will try in origin.
Have you plotted in matlab Perveen ?
-
January 5, 2015 at 2:08 pm #17035perveen akhterParticipant
no, but you can definitely import it into matlab and plot it.
-
-
January 6, 2015 at 12:04 pm #17054Dr. Subhashish TiwariParticipant
ok, thanks..
-
-
AuthorPosts
- You must be logged in to reply to this topic.