🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

.oml file

User: "HenLopes"
Altair Community Member
Updated by HenLopes

Hello,

 

Anyone knows by chance how to open and read all data in a .oml file that contains a Matrix [n;n] and a Cell array of strings ?

 

Thank you

 

 

 

 

Find more posts tagged with

Sort by:
1 - 9 of 91
    User: "L Moretti"
    New Altair Community Member
    Updated by L Moretti

    Hi HenLopes,

     

    could you please post here something similar to what you're trying to read?

     

    Thanks,

     

    Lorenzo

     

    User: "HenLopes"
    Altair Community Member
    OP
    Updated by HenLopes

    Hi Lorenzo,

     

    Yes sure.

    It's a file combining a cell array 'Casename_Track' and a huge matrix 'Track_Stress_Matrix'.

    Something like this.

    Thank you very much for your help.

     

    <?xml version="1.0" encoding="UTF-8"?>TestFile.PNG

    User: "L Moretti"
    New Altair Community Member
    Updated by L Moretti

    Hi HenLopes,

    are you trying to convert a .m file into a .oml (Compose) file, by any chance?

     

    Cheers,

     

    Lorenzo

     

     

    User: "HenLopes"
    Altair Community Member
    OP
    Updated by HenLopes

    Yes, Lorenzo.

    User: "L Moretti"
    New Altair Community Member
    Updated by L Moretti

    Clear! It's way easier!

    Try to change the extension of the .m file! 

     

    Just replace .m with .oml! And then you can open it directly in Compose!

     

    Cheers,

     

     

    Lorenzo

    User: "HenLopes"
    Altair Community Member
    OP
    Updated by HenLopes

    Thanks Lorenzo.

    It works for the file conversion.

     

    My problem now is to invoke that file (.oml) inside the scripting code.

    I already tried to type the name of the file on editor's window but unfortunately it doesn't work.

     

    Do you know as well how to do that?

     

    Any help would be greatly appreaciated.

     

    Thank you.

     

     

    User: "L Moretti"
    New Altair Community Member
    Updated by L Moretti

    If I have not misunderstood what you're saying, this is due to the fact that the script you're calling is not a function.

     

    Feel free to upload your script in the forum, or just the portion of it which is not working. In this way we can solve the problem more easily.

     

    Thanks,

     

    Lorenzo 

    User: "HenLopes"
    Altair Community Member
    OP
    Updated by HenLopes

    Ok I explain better.

     

    When for instance I want to read the content of  a .txt file in my scripting I just type something like this:

     

    file = fopen ( ' nodes.txt'.'r');

    nodes = textscan(fid, %d %f %f %f %f )

    fclose(fid);

     

    Now I want to read all data from my .oml file  as well.

     

    What command I need to use to open my .oml file, that's my doubt?

     

    For instance from MATLAB I know that when you need to call a (.m) file in your code you just type the name and the program automatically recognizes it.

     

    Hope this make sense.

     

     

     

     

     

    User: "L Moretti"
    New Altair Community Member
    Updated by L Moretti

    Let me see if I get your point.

     

    Let's assume that:

     

    file = fopen ( ' nodes.txt'.'r');

    nodes = textscan(fid, %d %f %f %f %f )

    fclose(fid);

     

    is my 'reading.oml' file.

     

    You have more ways to run it:

     

    1) open it in the editor window and click on the run icon (top-left corner of Compose interface);

    2) type its name in the Command window and press 'enter'

    3) call it from a master script. For this case look at the script 'master.oml' in attached

     

    Have I answered your question?

     

    Cheers,

     

    Lorenzo

     

    P.S. to use the files in attached put them in the same folder. And check that the pwd of Compose is pointing at that folder.

    Unable to find an attachment - read this blog