SolidThinking Compose read files

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

Hello, 

 

I searched for a topic Compose but I didn't find, so I'm asking here.
I would like to know how to read csv files in Compose, because I tried with the same command of MatLab and it did not work.
I would also like to know if it have some function to do heaviside.

 

 

Tagged:

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited August 2016

    The following code gives a description of how to read data line by line in sT Compose.

     

    file = 'small_indian_train_data.csv';
    fid = fopen(file,'rt');   
    counter = 0;
    % read file line by line
    while ~feof(fid)
    counter = counter + 1;
    line = fgetl(fid);
    sprintf('line %d in %s: %s',counter,file,line)
    end
    fclose(fid);